pub struct PoolGuard<'a, T: Send, F: Fn() -> T>(_);
Expand description
A guard that is returned when a caller requests a value from the pool.
The purpose of the guard is to use RAII to automatically put the value
back in the pool once it’s dropped.
Consumes this guard and puts it back into the pool.
This circumvents the guard’s Drop
implementation. This can be useful
in circumstances where the automatic Drop
results in poorer codegen,
such as calling non-inlined functions.
Formats the value using the given formatter.
Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
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.