Skip to main content

Status

Struct Status 

Source
pub struct Status { /* private fields */ }

Implementations§

Source§

impl Status

Source

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.

Source

pub fn pid(&self) -> u32

Returns the cache’s PID.

Source

pub fn max_size(&self) -> u64

Returns the cache’s maximum size in bytes.

Source

pub fn used_size(&self) -> u64

Returns the cache’s used size in bytes.

Source

pub fn num_objects(&self) -> u64

Returns the number of objects in the cache.

Source

pub fn rss(&self) -> u64

Returns the cache’s resident set size.

Source

pub fn hwm(&self) -> u64

Returns the cache’s resident set size high water mark.

Source

pub fn total_gets(&self) -> u64

Returns the cache’s total number of gets.

Source

pub fn total_sets(&self) -> u64

Returns the cache’s total number of sets.

Source

pub fn total_dels(&self) -> u64

Returns the cache’s total number of dels.

Source

pub fn miss_ratio(&self) -> f64

Returns the cache’s miss ratio.

Source

pub fn policies(&self) -> &[PaperPolicy]

Returns the cache’s configured eviction policies.

Source

pub fn policy(&self) -> &PaperPolicy

Returns the cache’s eviction policy.

Source

pub fn is_auto_policy(&self) -> bool

Returns true if the cache is configured to the PaperPolicy::Auto eviction policy.

Source

pub fn uptime(&self) -> u64

Returns the cache’s uptime.

Trait Implementations§

Source§

impl Debug for Status

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.