Prune

Trait Prune 

Source
pub trait Prune<K, V, P> {
    // Required method
    fn prune<S: BuildHasher>(&mut self, cache: &LightCache<K, V, S, P>);
}
Expand description

Prune should control how entries are expired (not nescessarily evicted) from the cache

Required Methods§

Source

fn prune<S: BuildHasher>(&mut self, cache: &LightCache<K, V, S, P>)

Prune is typically be called before any operation on the cache

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.

Implementations on Foreign Types§

Source§

impl<K, V> Prune<K, V, NoopPolicy> for ()

Source§

fn prune<S: BuildHasher>(&mut self, _: &LightCache<K, V, S, NoopPolicy>)

Implementors§

Source§

impl<K, V> Prune<K, V, LruPolicy<K, V>> for LruPolicyInner<K>
where K: Copy + Eq + Hash, V: Clone + Sync,

Source§

impl<K, V> Prune<K, V, TtlPolicy<K, V>> for TtlPolicyInner<K>
where K: Copy + Eq + Hash, V: Clone + Sync,