Struct storage_hal::Storage
source · pub struct Storage { /* private fields */ }Implementations§
source§impl Storage
impl Storage
pub fn new(config: &StorageConfig) -> Self
pub fn recover_root(&self)
pub fn recover<T: StorageData>(&self)
pub fn run_pending_tasks(&self)
source§impl Storage
impl Storage
pub fn contains_key<T: StorageData>(&self, key: &str) -> bool
pub fn get<T: for<'a> Deserialize<'a> + StorageData>( &self, key: &str, ) -> Option<T>
pub fn insert<T: Serialize + StorageData>( &self, key: &str, value: T, ) -> Option<T>
pub fn remove<T: StorageData>(&self, key: &str)
Trait Implementations§
impl Send for Storage
impl Sync for Storage
Auto Trait Implementations§
impl !Freeze for Storage
impl !RefUnwindSafe 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more