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