pub struct Storage { /* private fields */ }Expand description
Storage that is used in Node.
Implementations§
Source§impl Storage
impl Storage
Sourcepub fn get<T>(&self) -> Option<&T>
pub fn get<T>(&self) -> Option<&T>
Gets reference of a value with type T from storage if it is present.
Sourcepub fn get_mut<T>(&mut self) -> Option<&mut T>
pub fn get_mut<T>(&mut self) -> Option<&mut T>
Gets mutable reference of a value with type T from storage if it is present.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Storage
impl !RefUnwindSafe for Storage
impl Send for Storage
impl !Sync for Storage
impl Unpin for Storage
impl !UnwindSafe for Storage
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