Struct cyfs_util::LocalStore
source · [−]pub struct LocalStore { /* private fields */ }Implementations
sourceimpl LocalStore
impl LocalStore
pub fn new(prefix: Option<&str>, async_storage: AsyncStorageSync) -> Self
pub fn sub_store(&self, sub_key: &str) -> LocalStore
pub async fn set(&mut self, key: &str, value: String) -> Result<(), BuckyError>
pub async fn set_obj<T>(&mut self, key: &str, value: &T) -> Result<(), BuckyError>where
T: ?Sized + Serialize,
pub async fn get(&mut self, key: &str) -> Option<String>
pub async fn get_obj<T>(&mut self, key: &str) -> Result<Option<T>, BuckyError>where
T: DeserializeOwned,
pub async fn remove(&mut self, key: &str) -> Option<()>
pub async fn remove_obj<T>(
&mut self,
key: &str
) -> Result<Option<()>, BuckyError>where
T: DeserializeOwned,
pub async fn clear(&mut self)
Auto Trait Implementations
impl !RefUnwindSafe for LocalStore
impl Send for LocalStore
impl Sync for LocalStore
impl Unpin for LocalStore
impl !UnwindSafe for LocalStore
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