cached

Trait CloneCached

Source
pub trait CloneCached<K, V> {
    // Required method
    fn cache_get_expired<Q>(&mut self, _key: &Q) -> (Option<V>, bool)
       where K: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
}
Expand description

Extra cache operations for types that implement Clone

Required Methods§

Source

fn cache_get_expired<Q>(&mut self, _key: &Q) -> (Option<V>, bool)
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Attempt to retrieve a cached value and indicate whether that value was evicted.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<K: Hash + Eq + Clone, V: Clone> CloneCached<K, V> for TimedCache<K, V>

Source§

impl<K: Hash + Eq + Clone, V: Clone> CloneCached<K, V> for TimedSizedCache<K, V>

Source§

impl<K: Hash + Eq + Clone, V: CanExpire + Clone> CloneCached<K, V> for ExpiringValueCache<K, V>