pub struct RemoteDataStorage { /* private fields */ }Expand description
A distributed data storage implementation that stores data across multiple nodes.
Trait Implementations§
Source§impl DataStorage for RemoteDataStorage
impl DataStorage for RemoteDataStorage
Source§async fn get_keys(&self) -> Result<Vec<String>, DataStorageError>
async fn get_keys(&self) -> Result<Vec<String>, DataStorageError>
Returns all keys currently stored in the store.
Source§async fn store<T: Serialize>(
&self,
key: &str,
mode: &StoreMode,
item: &T,
) -> Result<(), DataStorageError>
async fn store<T: Serialize>( &self, key: &str, mode: &StoreMode, item: &T, ) -> Result<(), DataStorageError>
Stores a serializable item for a given key using the provided
StoreMode.Source§async fn get<T: DeserializeOwned>(
&self,
key: &str,
) -> Result<Option<(T, String)>, DataStorageError>
async fn get<T: DeserializeOwned>( &self, key: &str, ) -> Result<Option<(T, String)>, DataStorageError>
Retrieves and deserializes the value for a given key, returning the value and its CAS
string if present. Returns
Ok(None) when the key does not exist.Source§async fn delete(&self, key: &str) -> Result<(), DataStorageError>
async fn delete(&self, key: &str) -> Result<(), DataStorageError>
Removes the item identified by the provided key from this storage instance.
Source§async fn delete_all(&self) -> Result<(), DataStorageError>
async fn delete_all(&self) -> Result<(), DataStorageError>
Removes all items from this storage instance.
Auto Trait Implementations§
impl Freeze for RemoteDataStorage
impl !RefUnwindSafe for RemoteDataStorage
impl !Send for RemoteDataStorage
impl !Sync for RemoteDataStorage
impl Unpin for RemoteDataStorage
impl !UnwindSafe for RemoteDataStorage
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