pub struct CacheStats { /* private fields */ }Expand description
Atomic hit/miss counters for a cache.
All counters use Relaxed ordering — precise ordering guarantees across
threads are not required for statistics (approximate values are fine).
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn record_hit(&self)
pub fn record_hit(&self)
Record a single cache hit.
Sourcepub fn record_miss(&self)
pub fn record_miss(&self)
Record a single cache miss.
Trait Implementations§
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