Trait any_cache::Cache [] [src]

pub trait Cache {
    fn save<K>(&mut self, key: K, value: K::Target)
    where
        K::Target: Any + 'static,
        K: CacheKey
;
fn get<K>(&self, key: &K) -> Option<&K::Target>
    where
        K::Target: Any + 'static,
        K: CacheKey
;
fn remove<K>(&mut self, key: &K) -> Option<K::Target>
    where
        K::Target: Any + 'static,
        K: CacheKey
;
fn clear(&mut self); }

A cache that can store abitrary values and namespace them by key types.

Required Methods

Implementors