pub struct ShutdownToken { /* private fields */ }Expand description
Cheaply cloneable handle to a ShutdownHandler.
Implementations§
Source§impl ShutdownToken
impl ShutdownToken
Sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Returns true once shutdown has been triggered.
Sourcepub fn wait_timeout(&self, timeout: Duration) -> bool
pub fn wait_timeout(&self, timeout: Duration) -> bool
Block until shutdown or timeout. Returns true if shutdown was triggered.
Trait Implementations§
Source§impl Clone for ShutdownToken
impl Clone for ShutdownToken
Source§fn clone(&self) -> ShutdownToken
fn clone(&self) -> ShutdownToken
Returns a copy 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 ShutdownToken
impl RefUnwindSafe for ShutdownToken
impl Send for ShutdownToken
impl Sync for ShutdownToken
impl Unpin for ShutdownToken
impl UnwindSafe for ShutdownToken
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