pub struct ShutdownGuard { /* private fields */ }Expand description
Shutdown guard that triggers shutdown when dropped
Useful for ensuring cleanup happens even on panic.
Implementations§
Source§impl ShutdownGuard
impl ShutdownGuard
Sourcepub fn new(shutdown: Arc<GracefulShutdown>) -> Self
pub fn new(shutdown: Arc<GracefulShutdown>) -> Self
Create a new shutdown guard
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShutdownGuard
impl !RefUnwindSafe for ShutdownGuard
impl Send for ShutdownGuard
impl Sync for ShutdownGuard
impl Unpin for ShutdownGuard
impl !UnwindSafe for ShutdownGuard
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