pub struct StopReceiver(pub Receiver<bool>);
Expand description
Represents a receiver for the stop signal. This signal is sent when the node is shutting down. Every task is expected to listen to this signal and stop its execution when it is received.
This structure exists as a first-class entity instead of being a resource to make it more visible and prevent tasks from hanging by accident.
Tuple Fields§
§0: Receiver<bool>
Trait Implementations§
Source§impl Clone for StopReceiver
impl Clone for StopReceiver
Source§fn clone(&self) -> StopReceiver
fn clone(&self) -> StopReceiver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for StopReceiver
impl !RefUnwindSafe for StopReceiver
impl Send for StopReceiver
impl Sync for StopReceiver
impl Unpin for StopReceiver
impl !UnwindSafe for StopReceiver
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