[][src]Struct r_cache::cache::Cache

pub struct Cache<T, V> { /* fields omitted */ }

Implementations

impl<T, V> Cache<T, V>[src]

pub fn new(item_duration: Option<Duration>) -> Self[src]

pub async fn get<'_>(&'_ self, key: T) -> Option<V> where
    T: Eq + Hash,
    V: Clone
[src]

pub async fn set<'_>(&'_ self, key: T, value: V) -> Option<V> where
    T: Eq + Hash
[src]

Auto Trait Implementations

impl<T, V> !RefUnwindSafe for Cache<T, V>

impl<T, V> Send for Cache<T, V> where
    T: Send,
    V: Send

impl<T, V> Sync for Cache<T, V> where
    T: Send + Sync,
    V: Send + Sync

impl<T, V> Unpin for Cache<T, V> where
    T: Unpin,
    V: Unpin

impl<T, V> UnwindSafe for Cache<T, V> where
    T: 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.