pub enum EvictionStrategy {
Lru,
Lfu,
Fifo,
}Expand description
Discriminated union of the supported eviction strategies.
Variants§
Lru
Least Recently Used — evict the entry with the oldest access timestamp.
Lfu
Least Frequently Used — evict the entry with the lowest access count (represented here as the smallest access timestamp; in a real system a separate frequency counter would be maintained).
Fifo
First In, First Out — evict the entry at position 0 in the slice.
Trait Implementations§
Source§impl Clone for EvictionStrategy
impl Clone for EvictionStrategy
Source§fn clone(&self) -> EvictionStrategy
fn clone(&self) -> EvictionStrategy
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 moreimpl Copy for EvictionStrategy
Source§impl Debug for EvictionStrategy
impl Debug for EvictionStrategy
impl Eq for EvictionStrategy
Source§impl PartialEq for EvictionStrategy
impl PartialEq for EvictionStrategy
Source§fn eq(&self, other: &EvictionStrategy) -> bool
fn eq(&self, other: &EvictionStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EvictionStrategy
Auto Trait Implementations§
impl Freeze for EvictionStrategy
impl RefUnwindSafe for EvictionStrategy
impl Send for EvictionStrategy
impl Sync for EvictionStrategy
impl Unpin for EvictionStrategy
impl UnsafeUnpin for EvictionStrategy
impl UnwindSafe for EvictionStrategy
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