pub struct RcGuard<P: PoolAllocator<T>, T> { /* private fields */ }Expand description
A struct representing a guard over an object in the pool.
This struct ensures that the object is returned to the pool when it is dropped.
Implementations§
Source§impl<P: PoolAllocator<T>, T> RcGuard<P, T>
impl<P: PoolAllocator<T>, T> RcGuard<P, T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the guard and returns the object, without returning it to the pool.
This method should be used with caution, as it leads to objects not being returned to the pool.
Trait Implementations§
Source§impl<P: PoolAllocator<T>, T> AsRef<T> for RcGuard<P, T>
impl<P: PoolAllocator<T>, T> AsRef<T> for RcGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> Borrow<T> for RcGuard<P, T>
impl<P: PoolAllocator<T>, T> Borrow<T> for RcGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> Deref for RcGuard<P, T>
impl<P: PoolAllocator<T>, T> Deref for RcGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> DerefMut for RcGuard<P, T>
impl<P: PoolAllocator<T>, T> DerefMut for RcGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> Drop for RcGuard<P, T>
Implementation of the Drop trait for Guard.
impl<P: PoolAllocator<T>, T> Drop for RcGuard<P, T>
Implementation of the Drop trait for Guard.
This ensures that the object is returned to the pool when the guard is dropped, unless the object fails validation.
Source§impl<P: PoolAllocator<T>, T: Ord> Ord for RcGuard<P, T>
impl<P: PoolAllocator<T>, T: Ord> Ord for RcGuard<P, T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<P: PoolAllocator<T>, T: PartialOrd> PartialOrd for RcGuard<P, T>
impl<P: PoolAllocator<T>, T: PartialOrd> PartialOrd for RcGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> Pointer for RcGuard<P, T>
impl<P: PoolAllocator<T>, T> Pointer for RcGuard<P, T>
impl<P: PoolAllocator<T>, T: Eq> Eq for RcGuard<P, T>
Auto Trait Implementations§
impl<P, T> Freeze for RcGuard<P, T>where
T: Freeze,
impl<P, T> RefUnwindSafe for RcGuard<P, T>where
T: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, T> Send for RcGuard<P, T>
impl<P, T> Sync for RcGuard<P, T>
impl<P, T> Unpin for RcGuard<P, T>where
T: Unpin,
impl<P, T> UnwindSafe for RcGuard<P, T>where
T: UnwindSafe,
P: RefUnwindSafe,
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