pub struct Hole<'c, 'm, T: 'm, F: FnOnce() -> T> { /* private fields */ }Expand description
A Hole<'c, 'm, T, F> represents an unfilled &'m mut T which must be filled before the end of the Scope with lifetime 'c and recovery closure F.
An unfilled Hole<'c, 'm, T, F> that is destructed will try to use F` to fill the hole.
If the scope ends without the Hole being filled, the program will std::process::abort().
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'c, 'm, T, F> Freeze for Hole<'c, 'm, T, F>where
F: Freeze,
impl<'c, 'm, T, F> !RefUnwindSafe for Hole<'c, 'm, T, F>
impl<'c, 'm, T, F> !Send for Hole<'c, 'm, T, F>
impl<'c, 'm, T, F> !Sync for Hole<'c, 'm, T, F>
impl<'c, 'm, T, F> Unpin for Hole<'c, 'm, T, F>where
F: Unpin,
impl<'c, 'm, T, F> !UnwindSafe for Hole<'c, 'm, T, F>
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