pub struct Shutdown { /* private fields */ }Expand description
Shared shutdown request, one reason, first one wins.
Implementations§
Source§impl Shutdown
impl Shutdown
Sourcepub fn request(&self, reason: impl Into<String>)
pub fn request(&self, reason: impl Into<String>)
Asks for the mount to go away. Later calls are ignored: the first reason is the one that explains what happened.
Sourcepub fn is_requested(&self) -> bool
pub fn is_requested(&self) -> bool
Whether a shutdown was requested.
Sourcepub fn wait_timeout(&self, timeout: Duration) -> Option<String>
pub fn wait_timeout(&self, timeout: Duration) -> Option<String>
Waits up to timeout for a shutdown request and returns its reason.
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 UnsafeUnpin 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