Struct kv_cab::KV
[−]
[src]
pub struct KV<K, V> { /* fields omitted */ }
The type that represents the key-value store
Methods
impl<K: Clone + Encodable + Decodable + Eq + Hash, V: Clone + Encodable + Decodable> KV<K, V>
[src]
fn new(p: &'static str) -> KV<K, V>
Creates a new instance of the KV store
fn insert(&mut self, key: K, value: V) -> Result<bool, &'static str>
Inserta a key, value pair into the key-value store
fn get(&mut self, key: K) -> Option<V>
Get the value from a key
fn remove(&mut self, key: K) -> Result<bool, &'static str>
Removes a key and associated value from the key-value Store
fn keys(&mut self) -> Vec<K>
get all the keys contained in the KV Store