Trait foyer_storage::ReinsertionPolicy

source ·
pub trait ReinsertionPolicy: Send + Sync + 'static {
    type Key: StorageKey;
    type Value: StorageValue;

    // Required methods
    fn init(&self, context: ReinsertionContext<Self::Key, Self::Value>);
    fn judge(&self, key: &Arc<Self::Key>) -> bool;
}

Required Associated Types§

Required Methods§

source

fn init(&self, context: ReinsertionContext<Self::Key, Self::Value>)

source

fn judge(&self, key: &Arc<Self::Key>) -> bool

Implementors§

source§

impl<K, V> ReinsertionPolicy for ExistReinsertionPolicy<K, V>
where K: StorageKey, V: StorageValue,

§

type Key = K

§

type Value = V

source§

impl<K, V> ReinsertionPolicy for RatedTicketReinsertionPolicy<K, V>
where K: StorageKey, V: StorageValue,

§

type Key = K

§

type Value = V

source§

impl<K, V> ReinsertionPolicy for JudgeRecorder<K, V>
where K: StorageKey, V: StorageValue,

§

type Key = K

§

type Value = V