[−][src]Struct r_cache::cache::Cache
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]
T: Eq + Hash,
V: Clone,
pub async fn set(&self, key: T, value: V) -> Option<V> where
T: Eq + Hash, [src]
T: Eq + Hash,
pub async fn remove_expired_items(&self) where
T: Eq + Hash + Clone, [src]
T: Eq + Hash + Clone,
Auto Trait Implementations
impl<T, V> !RefUnwindSafe for Cache<T, V>[src]
impl<T, V> Send for Cache<T, V> where
T: Send,
V: Send, [src]
T: Send,
V: Send,
impl<T, V> Sync for Cache<T, V> where
T: Send + Sync,
V: Send + Sync, [src]
T: Send + Sync,
V: Send + Sync,
impl<T, V> Unpin for Cache<T, V> where
T: Unpin,
V: Unpin, [src]
T: Unpin,
V: Unpin,
impl<T, V> UnwindSafe for Cache<T, V> where
T: UnwindSafe,
V: UnwindSafe, [src]
T: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,