pub trait PersistenceStorageReadAndWrite<K, V>: PersistenceStorageOperation {
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 K
) -> Pin<Box<dyn Future<Output = Result<V>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
entry: &'life2 V
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_all<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<(K, V)>>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Persistence Storage read and write functions
Required Methods§
sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 K
) -> Pin<Box<dyn Future<Output = Result<V>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 K
) -> Pin<Box<dyn Future<Output = Result<V>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a cache entry by key.
sourcefn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
entry: &'life2 V
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
entry: &'life2 V
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Put entry in the cache under key.