pub struct DropGuardAction<T: FnOnce()> { /* private fields */ }
Expand description
A drop guard that runs a finalizer when dropped.
This is useful in scenarios when you need to ensure cleanup happens after awaiting a future.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for DropGuardAction<T>where
T: Freeze,
impl<T> RefUnwindSafe for DropGuardAction<T>where
T: RefUnwindSafe,
impl<T> Send for DropGuardAction<T>where
T: Send,
impl<T> Sync for DropGuardAction<T>where
T: Sync,
impl<T> Unpin for DropGuardAction<T>where
T: Unpin,
impl<T> UnwindSafe for DropGuardAction<T>where
T: UnwindSafe,
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