Struct cyfs_lib::StateStorageMap
source · [−]pub struct StateStorageMap { /* private fields */ }
Implementations
sourceimpl 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 !RefUnwindSafe for StateStorageMap
impl Send for StateStorageMap
impl Sync for StateStorageMap
impl Unpin for StateStorageMap
impl !UnwindSafe for StateStorageMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more