pub trait CacheIFace<K: Eq, O> {
    // Required methods
    fn invalidate_all(&mut self);
    fn invalidate_stale(&mut self);
    fn opt(&mut self, key: &K) -> Option<&O>;
    fn opt_mut(&mut self, key: &K) -> Option<&mut O>;
    fn opt_no_touch(&self, key: &K) -> Option<&O>;
    fn get(&mut self, key: &K) -> Option<&O>;
    fn get_mut(&mut self, key: &K) -> Option<&mut O>;
    fn contains_key(&self, key: &K) -> bool;
    fn invalidate(&mut self, key: &K);
    fn insert(&mut self, key: K, item: O);
}

Required Methods§

source

fn invalidate_all(&mut self)

source

fn invalidate_stale(&mut self)

source

fn opt(&mut self, key: &K) -> Option<&O>

source

fn opt_mut(&mut self, key: &K) -> Option<&mut O>

source

fn opt_no_touch(&self, key: &K) -> Option<&O>

source

fn get(&mut self, key: &K) -> Option<&O>

source

fn get_mut(&mut self, key: &K) -> Option<&mut O>

source

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

source

fn invalidate(&mut self, key: &K)

source

fn insert(&mut self, key: K, item: O)

Implementors§

source§

impl<K: Eq + Hash + Clone, O> CacheIFace<K, O> for Cache<K, O>