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>
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