pub struct PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq,
C: PersistedContainer<Value = K::Value>,{ /* private fields */ }Expand description
A guard encompassing the lifespan of a mutable reference to a lazy container. The purpose of this is to save the value immediately after it is mutated. The save will only occur if the value actually changed. A copy of the previous value is saved before the mutable access, and compared after the access.
Trait Implementations§
Source§impl<'a, S, K, C> Debug for PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq + Debug,
C: PersistedContainer<Value = K::Value>,
&'a mut PersistedLazy<S, K, C>: Debug,
impl<'a, S, K, C> Debug for PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq + Debug,
C: PersistedContainer<Value = K::Value>,
&'a mut PersistedLazy<S, K, C>: Debug,
Source§impl<'a, S, K, C> Deref for PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq,
C: PersistedContainer<Value = K::Value>,
impl<'a, S, K, C> Deref for PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq,
C: PersistedContainer<Value = K::Value>,
Source§impl<'a, S, K, C> DerefMut for PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq,
C: PersistedContainer<Value = K::Value>,
impl<'a, S, K, C> DerefMut for PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq,
C: PersistedContainer<Value = K::Value>,
Source§impl<'a, S, K, C> Drop for PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq,
C: PersistedContainer<Value = K::Value>,
Save value after modification only if it changed
impl<'a, S, K, C> Drop for PersistedLazyRefMut<'a, S, K, C>where
S: PersistedStore<K>,
K: PersistedKey,
K::Value: PartialEq,
C: PersistedContainer<Value = K::Value>,
Save value after modification only if it changed
Auto Trait Implementations§
impl<'a, S, K, C> Freeze for PersistedLazyRefMut<'a, S, K, C>
impl<'a, S, K, C> RefUnwindSafe for PersistedLazyRefMut<'a, S, K, C>where
K: RefUnwindSafe,
C: RefUnwindSafe,
S: RefUnwindSafe,
<K as PersistedKey>::Value: RefUnwindSafe,
impl<'a, S, K, C> Send for PersistedLazyRefMut<'a, S, K, C>
impl<'a, S, K, C> Sync for PersistedLazyRefMut<'a, S, K, C>
impl<'a, S, K, C> Unpin for PersistedLazyRefMut<'a, S, K, C>
impl<'a, S, K, C> !UnwindSafe for PersistedLazyRefMut<'a, S, K, C>
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