pub struct PoolGuard<'a, T: Send, F: Fn() -> T>(/* private fields */);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>where
PoolGuard<'a, T, F>: Freeze,
impl<'a, T, F> RefUnwindSafe for PoolGuard<'a, T, F>where
PoolGuard<'a, T, F>: RefUnwindSafe,
impl<'a, T, F> Send for PoolGuard<'a, T, F>where
PoolGuard<'a, T, F>: Send,
impl<'a, T, F> Sync for PoolGuard<'a, T, F>where
PoolGuard<'a, T, F>: Sync,
impl<'a, T, F> Unpin for PoolGuard<'a, T, F>where
PoolGuard<'a, T, F>: Unpin,
impl<'a, T, F> UnsafeUnpin for PoolGuard<'a, T, F>where
PoolGuard<'a, T, F>: UnsafeUnpin,
impl<'a, T, F> UnwindSafe for PoolGuard<'a, T, F>where
PoolGuard<'a, T, 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