pub struct ShutdownController { /* private fields */ }Expand description
Shutdown controller — owns the signal and triggers shutdown.
Implementations§
Source§impl ShutdownController
impl ShutdownController
Sourcepub fn new() -> (Self, ShutdownSignal)
pub fn new() -> (Self, ShutdownSignal)
Create a new controller and its signal receiver.
Sourcepub fn signal(&self) -> ShutdownSignal
pub fn signal(&self) -> ShutdownSignal
Create a signal receiver (can create multiple).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShutdownController
impl !RefUnwindSafe for ShutdownController
impl Send for ShutdownController
impl Sync for ShutdownController
impl Unpin for ShutdownController
impl UnsafeUnpin for ShutdownController
impl !UnwindSafe for ShutdownController
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