Struct muse_reactor::Builder
source · pub struct Builder<Work> { /* private fields */ }Expand description
A builder for a Reactor.
Implementations§
source§impl<Work> Builder<Work>where
Work: WorkUnit,
impl<Work> Builder<Work>where
Work: WorkUnit,
sourcepub fn threads(self, thread_count: usize) -> Self
pub fn threads(self, thread_count: usize) -> Self
Sets the number of threads to execute tasks across.
sourcepub fn work_queue_limit(self, limit: usize) -> Self
pub fn work_queue_limit(self, limit: usize) -> Self
Sets the maximum number of work items in queue.
By default, work queues are not limited.
sourcepub fn finish(self) -> ReactorHandle<Work>
pub fn finish(self) -> ReactorHandle<Work>
Spawns a reactor with the given settings and returns a handle to it.
Trait Implementations§
Auto Trait Implementations§
impl<Work> Freeze for Builder<Work>
impl<Work> !RefUnwindSafe for Builder<Work>
impl<Work> Send for Builder<Work>where
Work: Send,
impl<Work> Sync for Builder<Work>where
Work: Sync,
impl<Work> Unpin for Builder<Work>where
Work: Unpin,
impl<Work> !UnwindSafe for Builder<Work>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more