pub struct CacheEntryStats {
pub id: u64,
pub hit_count: u32,
pub last_hit_time_s: f64,
}Expand description
Per-entry stats the eviction policy needs. Caller (the F1/F3 cache layer) keeps these alongside each entry and passes a snapshot when capacity pressure triggers.
Fields§
§id: u64Stable identifier for the entry (cache slot index, hash, SpecCacheKey index, etc). Pure pass-through - the policy only uses it to name which entries to evict.
hit_count: u32Total hits since the entry was inserted.
last_hit_time_s: f64Wall-clock time (seconds since epoch or any monotonic clock)
the entry was last hit. Same clock reference as
current_time_s.
Implementations§
Trait Implementations§
Source§impl Clone for CacheEntryStats
impl Clone for CacheEntryStats
Source§fn clone(&self) -> CacheEntryStats
fn clone(&self) -> CacheEntryStats
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 CacheEntryStats
Auto Trait Implementations§
impl Freeze for CacheEntryStats
impl RefUnwindSafe for CacheEntryStats
impl Send for CacheEntryStats
impl Sync for CacheEntryStats
impl Unpin for CacheEntryStats
impl UnsafeUnpin for CacheEntryStats
impl UnwindSafe for CacheEntryStats
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