Struct hirofa_utils::cache::Cache[][src]

pub struct Cache<K: Eq + Hash, O> { /* fields omitted */ }

Implementations

impl<K: Eq + Hash, O> Cache<K, O>[src]

pub fn new<P>(producer: P, max_inactive_time: Duration, max_size: usize) -> Self where
    P: Fn(&K) -> Option<O> + 'static, 
[src]

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

pub fn is_empty(&self) -> bool[src]

Trait Implementations

impl<K: Eq + Hash + Clone, O> CacheIFace<K, O> for Cache<K, O>[src]

Auto Trait Implementations

impl<K, O> !RefUnwindSafe for Cache<K, O>

impl<K, O> !Send for Cache<K, O>

impl<K, O> !Sync for Cache<K, O>

impl<K, O> Unpin for Cache<K, O>

impl<K, O> !UnwindSafe for Cache<K, O>

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.