Trait freqache::Policy [−][src]
pub trait Policy<K, V>: Sized + Send { fn can_evict(&self, value: &V) -> bool; #[must_use] fn evict<'life0, 'life1, 'async_trait>(
&'life0 self,
key: K,
value: &'life1 V
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; }
A cache eviction policy.
Required methods
fn can_evict(&self, value: &V) -> bool
[src]
#[must_use]fn evict<'life0, 'life1, 'async_trait>(
&'life0 self,
key: K,
value: &'life1 V
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]
fn evict<'life0, 'life1, 'async_trait>(&'life0 self,
key: K,
value: &'life1 V
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,