pub trait Eviction: Send + Sync {
// Required method
fn choose(&self, entries: &[Entry], limit: u64) -> Vec<(String, u64)>;
}Expand description
The eviction policy: given every entry, the cache’s limit and its size, which entries to delete. It decides and never acts — the cache deletes them, skipping any being served.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".