pub enum SlruSegment {
Probationary,
Protected,
}Expand description
Segment location within an SLRU cache.
SLRU divides the cache into two segments:
- Probationary: New entries start here
- Protected: Entries promoted after multiple accesses
Items in the protected segment are shielded from one-time scans.
Variants§
Probationary
Entry is in the probationary segment (initial placement). Items here are candidates for eviction when the cache is full.
Protected
Entry is in the protected segment (promoted after repeated access). Items here are protected from eviction by one-time scans.
Trait Implementations§
Source§impl Clone for SlruSegment
impl Clone for SlruSegment
Source§fn clone(&self) -> SlruSegment
fn clone(&self) -> SlruSegment
Returns a duplicate of the value. Read more
1.0.0 · 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 SlruSegment
impl Debug for SlruSegment
Source§impl Default for SlruSegment
impl Default for SlruSegment
Source§fn default() -> SlruSegment
fn default() -> SlruSegment
Returns the “default value” for a type. Read more
Source§impl PartialEq for SlruSegment
impl PartialEq for SlruSegment
impl Copy for SlruSegment
impl Eq for SlruSegment
impl StructuralPartialEq for SlruSegment
Auto Trait Implementations§
impl Freeze for SlruSegment
impl RefUnwindSafe for SlruSegment
impl Send for SlruSegment
impl Sync for SlruSegment
impl Unpin for SlruSegment
impl UnwindSafe for SlruSegment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.