pub struct ShutdownDropGuard { /* private fields */ }Expand description
A wrapper for DropGuard that wraps around a cancellation token
which automatically cancels it on drop.
It is created using drop_guard method on the ShutdownToken.
Implementations§
Source§impl ShutdownDropGuard
impl ShutdownDropGuard
Sourcepub fn disarm(self) -> ShutdownToken
pub fn disarm(self) -> ShutdownToken
Returns stored ShutdownToken and removes this drop guard instance (i.e. it will no longer cancel token). Other guards for this token are not affected.
Auto Trait Implementations§
impl Freeze for ShutdownDropGuard
impl RefUnwindSafe for ShutdownDropGuard
impl Send for ShutdownDropGuard
impl Sync for ShutdownDropGuard
impl Unpin for ShutdownDropGuard
impl UnwindSafe for ShutdownDropGuard
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