[][src]Struct jupiter::lru::lru::LRUCache

pub struct LRUCache { /* fields omitted */ }

Implementations

impl LRUCache[src]

pub fn new(
    capacity: usize,
    max_memory: usize,
    soft_ttl: Duration,
    hard_ttl: Duration,
    refresh_interval: Duration
) -> Self
[src]

pub fn put(&mut self, key: String, value: String) -> Result<()>[src]

pub fn get(&mut self, key: &str) -> Option<(bool, bool, &str)>[src]

pub fn remove(&mut self, key: &str)[src]

pub fn flush(&mut self)[src]

pub fn num_entries(&self) -> usize[src]

pub fn capacity(&self) -> usize[src]

pub fn set_capacity(&mut self, capacity: usize)[src]

pub fn allocated_memory(&self) -> usize[src]

pub fn total_allocated_memory(&self) -> usize[src]

pub fn max_memory(&self) -> usize[src]

pub fn set_max_memory(&mut self, max_memory: usize)[src]

pub fn utilization(&self) -> f32[src]

pub fn memory_utilization(&self) -> f32[src]

pub fn hit_rate(&self) -> f32[src]

pub fn write_read_ratio(&self) -> f32[src]

pub fn reads(&self) -> usize[src]

pub fn writes(&self) -> usize[src]

pub fn soft_ttl(&self) -> Duration[src]

pub fn set_soft_ttl(&mut self, soft_ttl: Duration)[src]

pub fn hard_ttl(&self) -> Duration[src]

pub fn set_hard_ttl(&mut self, hard_ttl: Duration)[src]

pub fn refresh_interval(&self) -> Duration[src]

pub fn set_refresh_interval(&mut self, refresh_interval: Duration)[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.