pub trait ThreadSafeCacheTrait<K: 'static + Clone + Eq + Hash + Serialize + DeserializeOwned, V: Clone + Serialize + DeserializeOwned + 'static> {
    // Required methods
    fn put(&mut self, key: K, val: V)
       where K: Eq + Hash;
    fn put_exp(&mut self, key: K, val: V, expiration: i32)
       where K: Eq + Hash + Clone;
    fn get(&mut self, key: K) -> Option<V>
       where K: Eq + Hash,
             V: Clone;
    fn exists(&mut self, key: K) -> bool;
    fn rm(&mut self, key: K);
}

Required Methods§

source

fn put(&mut self, key: K, val: V)where K: Eq + Hash,

source

fn put_exp(&mut self, key: K, val: V, expiration: i32)where K: Eq + Hash + Clone,

source

fn get(&mut self, key: K) -> Option<V>where K: Eq + Hash, V: Clone,

source

fn exists(&mut self, key: K) -> bool

source

fn rm(&mut self, key: K)

Implementors§