pub struct NoopMetrics;Expand description
No-op metrics implementation (default)
Zero overhead when metrics are not needed.
Trait Implementations§
Source§impl CacheMetrics for NoopMetrics
impl CacheMetrics for NoopMetrics
Source§fn record_hit(&self, _key: &str, _tier: CacheTier)
fn record_hit(&self, _key: &str, _tier: CacheTier)
Record a cache hit
Source§fn record_miss(&self, _key: &str)
fn record_miss(&self, _key: &str)
Record a cache miss
Source§fn record_stale_hit(&self, _key: &str)
fn record_stale_hit(&self, _key: &str)
Record a stale hit (served stale while revalidating)
Source§fn record_latency(&self, _operation: CacheOperation, _duration: Duration)
fn record_latency(&self, _operation: CacheOperation, _duration: Duration)
Record operation latency
Source§fn record_eviction(&self, _reason: EvictionReason)
fn record_eviction(&self, _reason: EvictionReason)
Record an eviction
Source§fn record_size(&self, _size: usize, _memory_bytes: usize)
fn record_size(&self, _size: usize, _memory_bytes: usize)
Record cache size
Source§impl Clone for NoopMetrics
impl Clone for NoopMetrics
Source§fn clone(&self) -> NoopMetrics
fn clone(&self) -> NoopMetrics
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 NoopMetrics
impl Debug for NoopMetrics
Source§impl Default for NoopMetrics
impl Default for NoopMetrics
Source§fn default() -> NoopMetrics
fn default() -> NoopMetrics
Returns the “default value” for a type. Read more
impl Copy for NoopMetrics
Auto Trait Implementations§
impl Freeze for NoopMetrics
impl RefUnwindSafe for NoopMetrics
impl Send for NoopMetrics
impl Sync for NoopMetrics
impl Unpin for NoopMetrics
impl UnwindSafe for NoopMetrics
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