Enum worker_pool::DownMsg
source · [−]pub enum DownMsg<Down: Send> {
Stop,
Pause,
Continue,
Other(Down),
}Expand description
A message sent from the manager to the workers
Variants
Stop
Instructs the workers to stop execution and return as soon as possible.
See WorkerPool::execute on more information as to how this value should be handled.
Pause
Instructs a worker to pause execution until the Continue message is received.
This value can safely be ignored, and what to do when another message is received while in the paused state is up to the worker.
Continue
Instructs a worker to resume execution. This value can safely be ignored.
Other(Down)
A customized message sent from the manager to the workers.
The Down type must implement Send and optionally Clone so that the messages can be sent.
Trait Implementations
impl<Down: Send> StructuralPartialEq for DownMsg<Down>
Auto Trait Implementations
impl<Down> RefUnwindSafe for DownMsg<Down> where
Down: RefUnwindSafe,
impl<Down> Send for DownMsg<Down>
impl<Down> Sync for DownMsg<Down> where
Down: Sync,
impl<Down> Unpin for DownMsg<Down> where
Down: Unpin,
impl<Down> UnwindSafe for DownMsg<Down> where
Down: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more