pub struct Status { /* private fields */ }Implementations§
Source§impl Status
impl Status
Sourcepub fn new(
pid: u32,
max_size: u64,
used_size: u64,
num_objects: u64,
rss: u64,
hwm: u64,
total_gets: u64,
total_sets: u64,
total_dels: u64,
miss_ratio: f64,
policies: Vec<PaperPolicy>,
policy: PaperPolicy,
is_auto_policy: bool,
uptime: u64,
) -> Self
pub fn new( pid: u32, max_size: u64, used_size: u64, num_objects: u64, rss: u64, hwm: u64, total_gets: u64, total_sets: u64, total_dels: u64, miss_ratio: f64, policies: Vec<PaperPolicy>, policy: PaperPolicy, is_auto_policy: bool, uptime: u64, ) -> Self
Creates a new instance of the cache’s status.
Sourcepub fn num_objects(&self) -> u64
pub fn num_objects(&self) -> u64
Returns the number of objects in the cache.
Sourcepub fn total_gets(&self) -> u64
pub fn total_gets(&self) -> u64
Returns the cache’s total number of gets.
Sourcepub fn total_sets(&self) -> u64
pub fn total_sets(&self) -> u64
Returns the cache’s total number of sets.
Sourcepub fn total_dels(&self) -> u64
pub fn total_dels(&self) -> u64
Returns the cache’s total number of dels.
Sourcepub fn miss_ratio(&self) -> f64
pub fn miss_ratio(&self) -> f64
Returns the cache’s miss ratio.
Sourcepub fn policies(&self) -> &[PaperPolicy]
pub fn policies(&self) -> &[PaperPolicy]
Returns the cache’s configured eviction policies.
Sourcepub fn policy(&self) -> &PaperPolicy
pub fn policy(&self) -> &PaperPolicy
Returns the cache’s eviction policy.
Sourcepub fn is_auto_policy(&self) -> bool
pub fn is_auto_policy(&self) -> bool
Returns true if the cache is configured to the PaperPolicy::Auto
eviction policy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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