Trait EventListener

Source
pub trait EventListener:
    Send
    + Sync
    + 'static {
    type Key;
    type Value;

    // Provided method
    fn on_leave(&self, reason: Event, key: &Self::Key, value: &Self::Value)
       where Self::Key: Key,
             Self::Value: Value { ... }
}
Expand description

Trait for the customized event listener.

Required Associated Types§

Source

type Key

Associated key type.

Source

type Value

Associated value type.

Provided Methods§

Source

fn on_leave(&self, reason: Event, key: &Self::Key, value: &Self::Value)
where Self::Key: Key, Self::Value: Value,

Called when a cache entry leaves the in-memory cache with the reason.

Implementors§