proximitylib::caching::approximate_cache

Trait ApproximateCache

Source
pub trait ApproximateCache<K, V>
where K: ApproxComparable, V: Clone,
{ // Required methods fn find(&mut self, key: &K) -> Option<V>; fn insert(&mut self, key: K, value: V); fn len(&self) -> usize; }

Required Methods§

Source

fn find(&mut self, key: &K) -> Option<V>

Source

fn insert(&mut self, key: K, value: V)

Source

fn len(&self) -> usize

Implementors§

Source§

impl<K, V> ApproximateCache<K, V> for BoundedLinearCache<K, V>
where K: ApproxComparable + Eq + Hash + Clone, V: Clone,

Source§

impl<K, V> ApproximateCache<K, V> for UnboundedLinearCache<K, V>
where K: ApproxComparable, V: Clone,