#[non_exhaustive]pub struct AccessTracker { /* private fields */ }Expand description
Tracks access patterns for cache entries.
Implementations§
Source§impl AccessTracker
impl AccessTracker
Sourcepub fn try_new() -> Result<Self, BackendError>
pub fn try_new() -> Result<Self, BackendError>
Fallible version of Self::new.
§Errors
Returns vyre_driver::BackendError if tracker backing storage cannot
be reserved.
Sourcepub fn hot_set(&self, n: usize) -> Vec<u64>
pub fn hot_set(&self, n: usize) -> Vec<u64>
Return the n hottest keys in most-recent-first order.
Sourcepub fn stats(&self, key: u64) -> Option<AccessStats>
pub fn stats(&self, key: u64) -> Option<AccessStats>
Return access statistics for a key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AccessTracker
impl RefUnwindSafe for AccessTracker
impl Send for AccessTracker
impl Sync for AccessTracker
impl Unpin for AccessTracker
impl UnsafeUnpin for AccessTracker
impl UnwindSafe for AccessTracker
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