pub struct CacheStats { /* private fields */ }Expand description
缓存统计
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn record_hit(&self)
pub fn record_hit(&self)
记录命中
Sourcepub fn record_miss(&self)
pub fn record_miss(&self)
记录未命中
Sourcepub fn record_insert(&self)
pub fn record_insert(&self)
记录插入
Sourcepub fn record_eviction(&self)
pub fn record_eviction(&self)
记录淘汰
Sourcepub fn record_expiration(&self)
pub fn record_expiration(&self)
记录过期
Sourcepub fn expirations(&self) -> u64
pub fn expirations(&self) -> u64
获取过期删除次数
Sourcepub fn total_requests(&self) -> u64
pub fn total_requests(&self) -> u64
获取总请求数
Sourcepub fn snapshot(&self) -> CacheStatsSnapshot
pub fn snapshot(&self) -> CacheStatsSnapshot
创建快照
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 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