pub struct StateStorageMap { /* private fields */ }
Implementations§
Source§impl StateStorageMap
impl StateStorageMap
pub fn new(storage: StateStorage) -> Self
pub fn storage(&self) -> &StateStorage
pub fn into_storage(self) -> StateStorage
pub async fn save(&self) -> BuckyResult<()>
pub async fn abort(self)
pub async fn get(&self, key: impl Into<String>) -> BuckyResult<Option<ObjectId>>
pub async fn set( &self, key: impl Into<String>, value: &ObjectId, ) -> BuckyResult<Option<ObjectId>>
pub async fn set_ex( &self, key: impl Into<String>, value: &ObjectId, prev_value: Option<ObjectId>, auto_insert: bool, ) -> BuckyResult<Option<ObjectId>>
pub async fn insert( &self, key: impl Into<String>, value: &ObjectId, ) -> BuckyResult<()>
pub async fn remove( &self, key: impl Into<String>, ) -> BuckyResult<Option<ObjectId>>
pub async fn remove_ex( &self, key: impl Into<String>, prev_value: Option<ObjectId>, ) -> BuckyResult<Option<ObjectId>>
pub async fn next(&self, step: u32) -> BuckyResult<Vec<(String, ObjectId)>>
pub async fn reset(&self) -> BuckyResult<()>
pub async fn list(&self) -> BuckyResult<Vec<(String, ObjectId)>>
Auto Trait Implementations§
impl !Freeze for StateStorageMap
impl !RefUnwindSafe for StateStorageMap
impl Send for StateStorageMap
impl Sync for StateStorageMap
impl Unpin for StateStorageMap
impl !UnwindSafe for StateStorageMap
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> 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