pub struct StatsSnapshot {
pub hits: u64,
pub misses: u64,
pub evictions: u64,
pub expirations: u64,
pub size: u64,
pub sets: u64,
pub deletes: u64,
pub hit_rate: f64,
}Expand description
A point-in-time snapshot of cache statistics.
Unlike CacheStats, this struct contains plain values (not atomics)
and can be easily serialized or logged.
Fields§
§hits: u64§misses: u64§evictions: u64§expirations: u64§size: u64§sets: u64§deletes: u64§hit_rate: f64Trait Implementations§
Source§impl Clone for StatsSnapshot
impl Clone for StatsSnapshot
Source§fn clone(&self) -> StatsSnapshot
fn clone(&self) -> StatsSnapshot
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 StatsSnapshot
impl Debug for StatsSnapshot
Source§impl PartialEq for StatsSnapshot
impl PartialEq for StatsSnapshot
impl StructuralPartialEq for StatsSnapshot
Auto Trait Implementations§
impl Freeze for StatsSnapshot
impl RefUnwindSafe for StatsSnapshot
impl Send for StatsSnapshot
impl Sync for StatsSnapshot
impl Unpin for StatsSnapshot
impl UnwindSafe for StatsSnapshot
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