Trait cached::Cached
[−]
[src]
pub trait Cached<K, V> { fn cache_get(&mut self, k: &K) -> Option<&V>; fn cache_set(&mut self, k: K, v: V); fn cache_size(&self) -> usize; fn cache_hits(&self) -> Option<u32> { ... } fn cache_misses(&self) -> Option<u32> { ... } fn cache_capacity(&self) -> Option<usize> { ... } fn cache_lifespan(&self) -> Option<u64> { ... } }
Required Methods
fn cache_get(&mut self, k: &K) -> Option<&V>
fn cache_set(&mut self, k: K, v: V)
fn cache_size(&self) -> usize
Provided Methods
fn cache_hits(&self) -> Option<u32>
fn cache_misses(&self) -> Option<u32>
fn cache_capacity(&self) -> Option<usize>
fn cache_lifespan(&self) -> Option<u64>
Implementors
impl<K: Hash + Eq, V> Cached<K, V> for UnboundCache<K, V>
impl<K: Hash + Eq + Clone, V> Cached<K, V> for SizedCache<K, V>
impl<K: Hash + Eq, V> Cached<K, V> for TimedCache<K, V>