pub struct EntryEnergy {
pub read_count: u32,
pub recency_secs: f64,
pub association_strength: f32,
pub token_size: usize,
pub graph_centrality: f32,
}Expand description
Compute the “energy” (value) of a cache entry for Boltzmann eviction. Higher energy = more valuable = less likely to be evicted.
Fields§
§read_count: u32§recency_secs: f64§association_strength: f32§token_size: usize§graph_centrality: f32Implementations§
Auto Trait Implementations§
impl Freeze for EntryEnergy
impl RefUnwindSafe for EntryEnergy
impl Send for EntryEnergy
impl Sync for EntryEnergy
impl Unpin for EntryEnergy
impl UnsafeUnpin for EntryEnergy
impl UnwindSafe for EntryEnergy
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more