pub struct InMemCache<K, V> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<K, V> Cache<K, V> for InMemCache<K, V>
impl<K, V> Cache<K, V> for InMemCache<K, V>
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
k: &'life1 K,
) -> Pin<Box<dyn Future<Output = Result<Option<V>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set<'life0, 'async_trait>(
&'life0 self,
k: K,
v: V,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
k: &'life1 K,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl<K: Clone, V: Clone> Clone for InMemCache<K, V>
impl<K: Clone, V: Clone> Clone for InMemCache<K, V>
Source§fn clone(&self) -> InMemCache<K, V>
fn clone(&self) -> InMemCache<K, V>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<K, V> Freeze for InMemCache<K, V>
impl<K, V> !RefUnwindSafe for InMemCache<K, V>
impl<K, V> Send for InMemCache<K, V>
impl<K, V> Sync for InMemCache<K, V>
impl<K, V> Unpin for InMemCache<K, V>
impl<K, V> !UnwindSafe for InMemCache<K, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more