pub struct MutGuard<'a, V, S = &'a mut KvSize>where
V: EstimateSize,
S: GenericKvSize,{
inner: &'a mut V,
original_val_size: usize,
total_size: S,
}
Expand description
A guard holding a mutable reference to a value in a collection. When dropped, the size of the collection will be updated.
Fields§
§inner: &'a mut V
§original_val_size: usize
§total_size: S
Implementations§
source§impl<'a, V, S> MutGuard<'a, V, S>where
V: EstimateSize,
S: GenericKvSize,
impl<'a, V, S> MutGuard<'a, V, S>where
V: EstimateSize,
S: GenericKvSize,
Trait Implementations§
source§impl<V, S> Deref for MutGuard<'_, V, S>where
V: EstimateSize,
S: GenericKvSize,
impl<V, S> Deref for MutGuard<'_, V, S>where
V: EstimateSize,
S: GenericKvSize,
source§impl<V, S> DerefMut for MutGuard<'_, V, S>where
V: EstimateSize,
S: GenericKvSize,
impl<V, S> DerefMut for MutGuard<'_, V, S>where
V: EstimateSize,
S: GenericKvSize,
source§impl<V, S> Drop for MutGuard<'_, V, S>where
V: EstimateSize,
S: GenericKvSize,
impl<V, S> Drop for MutGuard<'_, V, S>where
V: EstimateSize,
S: GenericKvSize,
Auto Trait Implementations§
impl<'a, V, S> Freeze for MutGuard<'a, V, S>where
S: Freeze,
impl<'a, V, S> RefUnwindSafe for MutGuard<'a, V, S>where
S: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, V, S> Send for MutGuard<'a, V, S>
impl<'a, V, S> Sync for MutGuard<'a, V, S>
impl<'a, V, S> Unpin for MutGuard<'a, V, S>where
S: Unpin,
impl<'a, V, S = &'a mut KvSize> !UnwindSafe for MutGuard<'a, V, S>
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