pub struct SRefMut<'o, T: StableType + AsFixedSizeBytes> { /* private fields */ }Expand description
Mutable reference to data stored in stable memory
See also SRef.
Lazy on reads - only loads and deserializes the data, when it gets accessed. Lazy on writes - only performs actual underlying data updates when Drop-ped. Useful when building your own stable data structure. Immutable and mutable access is provided by dereferencing.
T has to implement StableType and AsFixedSizeBytes.
Implementations§
Source§impl<'o, T: StableType + AsFixedSizeBytes> SRefMut<'o, T>
impl<'o, T: StableType + AsFixedSizeBytes> SRefMut<'o, T>
Trait Implementations§
Source§impl<'o, T: StableType + AsFixedSizeBytes + CandidType> CandidType for SRefMut<'o, T>
impl<'o, T: StableType + AsFixedSizeBytes + CandidType> CandidType for SRefMut<'o, T>
Source§impl<'o, T: StableType + AsFixedSizeBytes> Deref for SRefMut<'o, T>
impl<'o, T: StableType + AsFixedSizeBytes> Deref for SRefMut<'o, T>
Source§impl<'o, T: StableType + AsFixedSizeBytes> DerefMut for SRefMut<'o, T>
impl<'o, T: StableType + AsFixedSizeBytes> DerefMut for SRefMut<'o, T>
Source§impl<'o, T: StableType + AsFixedSizeBytes> Drop for SRefMut<'o, T>
impl<'o, T: StableType + AsFixedSizeBytes> Drop for SRefMut<'o, T>
Auto Trait Implementations§
impl<'o, T> !Freeze for SRefMut<'o, T>
impl<'o, T> !RefUnwindSafe for SRefMut<'o, T>
impl<'o, T> Send for SRefMut<'o, T>where
T: Send,
impl<'o, T> !Sync for SRefMut<'o, T>
impl<'o, T> Unpin for SRefMut<'o, T>where
T: Unpin,
impl<'o, T> !UnwindSafe for SRefMut<'o, 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