Trait std_ext::map::CacheMapExt
source · pub trait CacheMapExt<K, V> {
// Required methods
fn get_with_timeout<Q>(&self, k: &Q) -> Option<&V>
where K: Borrow<Q> + Ord,
Q: Hash + Eq + Ord + ?Sized;
fn get_with_timeout_mut<Q>(&mut self, k: &Q) -> Option<&mut V>
where K: Borrow<Q> + Ord,
Q: Hash + Eq + Ord + ?Sized;
fn insert_with_timeout(
&mut self,
k: K,
v: V,
timeout: Option<Duration>
) -> Option<V>;
fn remove_expired_values(&mut self);
}
Required Methods§
fn get_with_timeout<Q>(&self, k: &Q) -> Option<&V>
fn get_with_timeout_mut<Q>(&mut self, k: &Q) -> Option<&mut V>
fn insert_with_timeout( &mut self, k: K, v: V, timeout: Option<Duration> ) -> Option<V>
fn remove_expired_values(&mut self)
Object Safety§
This trait is not object safe.