pub struct MemoStats {
pub hits: u64,
pub misses: u64,
pub evictions: u64,
pub expired_on_access: u64,
pub current_entries: usize,
}Expand description
Runtime statistics for a MemoCache.
Distinct from CacheStats in cache.rs — these counters use u64 (rather
than usize) and track an extra dimension: entries that were found but had
already expired.
Fields§
§hits: u64Number of lookups that returned a cached value.
misses: u64Number of lookups that found no entry at all.
evictions: u64Number of entries that were evicted to make room for new ones.
expired_on_access: u64Number of lookups that found an entry but it had expired (TTL).
current_entries: usizeNumber of entries currently stored in the cache.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoStats
impl RefUnwindSafe for MemoStats
impl Send for MemoStats
impl Sync for MemoStats
impl Unpin for MemoStats
impl UnsafeUnpin for MemoStats
impl UnwindSafe for MemoStats
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<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