pub struct PoolGuard<'a, T: Send, F: Fn() -> T>(/* private fields */);
Available on crate feature
alloc
only.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.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, F> Freeze for PoolGuard<'a, T, F>
impl<'a, T, F> RefUnwindSafe for PoolGuard<'a, T, F>
impl<'a, T, F> Send for PoolGuard<'a, T, F>
impl<'a, T, F> Sync for PoolGuard<'a, T, F>
impl<'a, T, F> Unpin for PoolGuard<'a, T, F>
impl<'a, T, F> UnwindSafe for PoolGuard<'a, 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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes