pub enum EvictionPolicy {
Lru,
Lfu,
Fifo,
Random,
TinyLfu,
}Expand description
Eviction strategy for a single cache tier.
Variants§
Lru
Evict the entry with the oldest last_access timestamp.
Lfu
Evict the entry with the lowest access frequency; tie-break on
last_access.
Fifo
Evict the entry that was inserted first (queue order).
Random
Evict a random entry using a deterministic xorshift32 PRNG.
TinyLfu
Approximate LFU with a tiny Count-Min admission filter.
Trait Implementations§
Source§impl Clone for EvictionPolicy
impl Clone for EvictionPolicy
Source§fn clone(&self) -> EvictionPolicy
fn clone(&self) -> EvictionPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvictionPolicy
impl Debug for EvictionPolicy
impl Eq for EvictionPolicy
Source§impl PartialEq for EvictionPolicy
impl PartialEq for EvictionPolicy
Source§fn eq(&self, other: &EvictionPolicy) -> bool
fn eq(&self, other: &EvictionPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EvictionPolicy
Auto Trait Implementations§
impl Freeze for EvictionPolicy
impl RefUnwindSafe for EvictionPolicy
impl Send for EvictionPolicy
impl Sync for EvictionPolicy
impl Unpin for EvictionPolicy
impl UnsafeUnpin for EvictionPolicy
impl UnwindSafe for EvictionPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more