pub struct CacheStats {
pub hits: u64,
pub misses: u64,
pub evictions: u64,
pub total_size_bytes: usize,
pub capacity: usize,
pub entry_count: usize,
pub ttl_expirations: u64,
pub pinned_count: usize,
}Expand description
Snapshot of cache statistics.
Fields§
§hits: u64Total number of successful cache lookups.
misses: u64Total number of failed cache lookups.
evictions: u64Total number of entries evicted to make room for new ones.
total_size_bytes: usizeSum of size_bytes for all currently resident entries.
capacity: usizeMaximum number of entries the cache will hold before evicting.
entry_count: usizeNumber of entries currently resident in the cache.
ttl_expirations: u64Number of entries that expired via TTL.
pinned_count: usizeNumber of pinned entries currently in the cache.
Trait Implementations§
Source§impl Clone for CacheStats
impl Clone for CacheStats
Source§fn clone(&self) -> CacheStats
fn clone(&self) -> CacheStats
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 moreAuto Trait Implementations§
impl Freeze for CacheStats
impl RefUnwindSafe for CacheStats
impl Send for CacheStats
impl Sync for CacheStats
impl Unpin for CacheStats
impl UnsafeUnpin for CacheStats
impl UnwindSafe for CacheStats
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