pub struct RcLocalGuard<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> RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T> RcLocalGuard<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 RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T> AsRef<T> for RcLocalGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> Borrow<T> for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T> Borrow<T> for RcLocalGuard<P, T>
Source§impl<P: PoolAllocator<T>, T: Debug> Debug for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T: Debug> Debug for RcLocalGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> Deref for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T> Deref for RcLocalGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> DerefMut for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T> DerefMut for RcLocalGuard<P, T>
Source§impl<P: PoolAllocator<T>, T: Display> Display for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T: Display> Display for RcLocalGuard<P, T>
Source§impl<P: PoolAllocator<T>, T> Drop for RcLocalGuard<P, T>
Implementation of the Drop trait for Guard.
impl<P: PoolAllocator<T>, T> Drop for RcLocalGuard<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: Hash> Hash for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T: Hash> Hash for RcLocalGuard<P, T>
Source§impl<P: PoolAllocator<T>, T: Ord> Ord for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T: Ord> Ord for RcLocalGuard<P, T>
Source§fn cmp(&self, other: &RcLocalGuard<P, T>) -> Ordering
fn cmp(&self, other: &RcLocalGuard<P, T>) -> Ordering
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: PartialEq> PartialEq for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T: PartialEq> PartialEq for RcLocalGuard<P, T>
Source§impl<P: PoolAllocator<T>, T: PartialOrd> PartialOrd for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T: PartialOrd> PartialOrd for RcLocalGuard<P, T>
Source§fn partial_cmp(&self, other: &RcLocalGuard<P, T>) -> Option<Ordering>
fn partial_cmp(&self, other: &RcLocalGuard<P, T>) -> Option<Ordering>
Source§fn lt(&self, other: &RcLocalGuard<P, T>) -> bool
fn lt(&self, other: &RcLocalGuard<P, T>) -> bool
Source§fn le(&self, other: &RcLocalGuard<P, T>) -> bool
fn le(&self, other: &RcLocalGuard<P, T>) -> bool
Source§fn gt(&self, other: &RcLocalGuard<P, T>) -> bool
fn gt(&self, other: &RcLocalGuard<P, T>) -> bool
Source§impl<P: PoolAllocator<T>, T> Pointer for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T> Pointer for RcLocalGuard<P, T>
impl<P: PoolAllocator<T>, T: Eq> Eq for RcLocalGuard<P, T>
Auto Trait Implementations§
impl<P, T> Freeze for RcLocalGuard<P, T>where
T: Freeze,
impl<P, T> !RefUnwindSafe for RcLocalGuard<P, T>
impl<P, T> !Send for RcLocalGuard<P, T>
impl<P, T> !Sync for RcLocalGuard<P, T>
impl<P, T> Unpin for RcLocalGuard<P, T>where
T: Unpin,
impl<P, T> !UnwindSafe for RcLocalGuard<P, T>
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