pub struct ScopeExit<F: FnOnce()> { /* private fields */ }
Expand description
Runs a closure when the instance goes out of scope.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for ScopeExit<F>where
F: Freeze,
impl<F> RefUnwindSafe for ScopeExit<F>where
F: RefUnwindSafe,
impl<F> Send for ScopeExit<F>where
F: Send,
impl<F> Sync for ScopeExit<F>where
F: Sync,
impl<F> Unpin for ScopeExit<F>where
F: Unpin,
impl<F> UnwindSafe for ScopeExit<F>where
F: 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