Skip to main content

AsyncStoreWrite

Trait AsyncStoreWrite 

Source
pub trait AsyncStoreWrite: StoreBase {
    // Required methods
    fn insert(
        &self,
        key: Self::Key,
        value: Self::Value,
    ) -> impl Future<Output = ()>;
    fn delete(&self, key: Self::Key) -> impl Future<Output = bool>;
}

Required Methods§

Source

fn insert(&self, key: Self::Key, value: Self::Value) -> impl Future<Output = ()>

Insert a value into the store

§Arguments:
  • key: the key associated with the value
  • value: the value itself
Source

fn delete(&self, key: Self::Key) -> impl Future<Output = bool>

Remove a value from the store

§Arguments
  • key: the key to be removed
§Returns
  • true if the key existed and has been removed
  • false otherwise

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§