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