Skip to main content

StoreWrite

Trait StoreWrite 

Source
pub trait StoreWrite<K, V> {
    // Required methods
    fn insert(&self, key: K, value: V);
    fn delete(&self, key: &K) -> bool;
}

Required Methods§

Source

fn insert(&self, key: K, value: V)

Insert a value into the store

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

fn delete(&self, key: &K) -> 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

Implementors§

Source§

impl<K: Ord, V> StoreWrite<K, V> for MemoryStore<K, V>