pub struct CacheStats { /* private fields */ }Expand description
Cache statistics tracker
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn record_hit(&self)
pub fn record_hit(&self)
Record a cache hit
Sourcepub fn record_miss(&self)
pub fn record_miss(&self)
Record a cache miss
Sourcepub fn record_set(&self)
pub fn record_set(&self)
Record a cache set operation
Sourcepub fn total_requests(&self) -> u64
pub fn total_requests(&self) -> u64
Get total requests (hits + misses)
Trait Implementations§
Source§impl Clone for CacheStats
impl Clone for CacheStats
Source§impl Debug for CacheStats
impl Debug for CacheStats
Source§impl Default for CacheStats
impl Default for CacheStats
Source§fn default() -> CacheStats
fn default() -> CacheStats
Returns the “default value” for a type. Read more
Auto 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