pub struct ShutdownSignal { /* private fields */ }Expand description
A handle held by a component that can be used to listen for shutdown requests.
Implementations§
Source§impl ShutdownSignal
impl ShutdownSignal
Sourcepub async fn recv(&mut self) -> Option<ShutdownReason>
pub async fn recv(&mut self) -> Option<ShutdownReason>
Wait for a shutdown signal.
Sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Returns true if a shutdown signal has been received.
Trait Implementations§
Source§impl Clone for ShutdownSignal
impl Clone for ShutdownSignal
Auto Trait Implementations§
impl Freeze for ShutdownSignal
impl !RefUnwindSafe for ShutdownSignal
impl Send for ShutdownSignal
impl Sync for ShutdownSignal
impl Unpin for ShutdownSignal
impl UnsafeUnpin for ShutdownSignal
impl !UnwindSafe for ShutdownSignal
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