pub struct PoolGuard<'a, T: Send, F: Fn() -> T, const MAX_POOL_STACKS: usize>(/* 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§
Source§impl<'a, T: Send + Debug, F: Fn() -> T, const MAX_POOL_STACKS: usize> Debug for PoolGuard<'a, T, F, MAX_POOL_STACKS>
impl<'a, T: Send + Debug, F: Fn() -> T, const MAX_POOL_STACKS: usize> Debug for PoolGuard<'a, T, F, MAX_POOL_STACKS>
Auto Trait Implementations§
impl<'a, T, F, const MAX_POOL_STACKS: usize> Freeze for PoolGuard<'a, T, F, MAX_POOL_STACKS>
impl<'a, T, F, const MAX_POOL_STACKS: usize> RefUnwindSafe for PoolGuard<'a, T, F, MAX_POOL_STACKS>
impl<'a, T, F, const MAX_POOL_STACKS: usize> Send for PoolGuard<'a, T, F, MAX_POOL_STACKS>
impl<'a, T, F, const MAX_POOL_STACKS: usize> Sync for PoolGuard<'a, T, F, MAX_POOL_STACKS>
impl<'a, T, F, const MAX_POOL_STACKS: usize> Unpin for PoolGuard<'a, T, F, MAX_POOL_STACKS>
impl<'a, T, F, const MAX_POOL_STACKS: usize> UnsafeUnpin for PoolGuard<'a, T, F, MAX_POOL_STACKS>
impl<'a, T, F, const MAX_POOL_STACKS: usize> UnwindSafe for PoolGuard<'a, T, F, MAX_POOL_STACKS>
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