pub struct Deferred<F: FnOnce()>(/* private fields */);
Expand description
Defers execution of a closure until a scope is exited.
As seen in “The Go Programming Language”.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Deferred<F>where
F: Freeze,
impl<F> RefUnwindSafe for Deferred<F>where
F: RefUnwindSafe,
impl<F> Send for Deferred<F>where
F: Send,
impl<F> Sync for Deferred<F>where
F: Sync,
impl<F> Unpin for Deferred<F>where
F: Unpin,
impl<F> UnwindSafe for Deferred<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