Trait foyer_memory::Weighter

source ·
pub trait Weighter<K, V>: Fn(&K, &V) -> usize + Send + Sync + 'static { }
Expand description

The weighter for the in-memory cache.

The weighter is used to calculate the weight of the cache entry.

Implementors§

source§

impl<K, V, T> Weighter<K, V> for T
where T: Fn(&K, &V) -> usize + Send + Sync + 'static,