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

Fills the Hole.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.