pub struct Cleanup(/* private fields */);Expand description
Run a callback exactly once when dropped. Combine with an owner registration or
effect_with_cleanup to release external resources.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Cleanup
impl !Send for Cleanup
impl !Sync for Cleanup
impl !UnwindSafe for Cleanup
impl Freeze for Cleanup
impl Unpin for Cleanup
impl UnsafeUnpin for Cleanup
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