pub struct CacheMetrics { /* private fields */ }Expand description
Cache metrics for monitoring.
Implementations§
Source§impl CacheMetrics
impl CacheMetrics
Sourcepub fn record_hit(&self)
pub fn record_hit(&self)
Records a cache hit.
Sourcepub fn record_miss(&self)
pub fn record_miss(&self)
Records a cache miss.
Sourcepub fn record_eviction(&self)
pub fn record_eviction(&self)
Records an eviction.
Sourcepub fn snapshot(&self) -> CacheStats
pub fn snapshot(&self) -> CacheStats
Returns current metrics.
Trait Implementations§
Source§impl Debug for CacheMetrics
impl Debug for CacheMetrics
Source§impl Default for CacheMetrics
impl Default for CacheMetrics
Source§fn default() -> CacheMetrics
fn default() -> CacheMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for CacheMetrics
impl RefUnwindSafe for CacheMetrics
impl Send for CacheMetrics
impl Sync for CacheMetrics
impl Unpin for CacheMetrics
impl UnwindSafe for CacheMetrics
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