pub struct Shutdown { /* private fields */ }Expand description
A group of ShutdownListeners waiting for a shutdown signal.
Implementations§
Source§impl Shutdown
impl Shutdown
Sourcepub fn quit(&'static self)
pub fn quit(&'static self)
Manually shut down this Shutdown instance.
This has no effect if called multiple times.
Sourcepub fn listen(&'static self) -> ShutdownListener ⓘ
pub fn listen(&'static self) -> ShutdownListener ⓘ
Creates a new ShutdownListener on this Shutdown instance.
Sourcepub fn wait(&self) -> Wait<'_> ⓘ
pub fn wait(&self) -> Wait<'_> ⓘ
Returns a future that completes once a shutdown signal has been received and all
ShutdownListeners have been dropped.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Shutdown
impl RefUnwindSafe for Shutdown
impl Send for Shutdown
impl Sync for Shutdown
impl Unpin for Shutdown
impl UnwindSafe for Shutdown
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