[][src]Struct cached::stores::TimedCache

pub struct TimedCache<K, V> { /* fields omitted */ }

Cache store bound by time

Values are timestamped when inserted and are evicted if expired at time of retrieval.

Note: This cache is in-memory only

Implementations

impl<K: Hash + Eq, V> TimedCache<K, V>[src]

pub fn with_lifespan(seconds: u64) -> TimedCache<K, V>[src]

Creates a new TimedCache with a specified lifespan

pub fn with_lifespan_and_capacity(seconds: u64, size: usize) -> TimedCache<K, V>[src]

Creates a new TimedCache with a specified lifespan and cache-store with the specified pre-allocated capacity

Trait Implementations

impl<K: Hash + Eq, V> Cached<K, V> for TimedCache<K, V>[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for TimedCache<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for TimedCache<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for TimedCache<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for TimedCache<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for TimedCache<K, V> where
    K: UnwindSafe,
    V: UnwindSafe

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.