Trait foyer_storage::AsyncStorageExt

source ·
pub trait AsyncStorageExt<K, V>: Storage<K, V>
where K: StorageKey, V: StorageValue,
{ // Provided methods fn insert_async<AK, AV>(&self, key: AK, value: AV) where AK: Into<Arc<K>> + Send + 'static, AV: Into<Arc<V>> + Send + 'static { ... } fn insert_if_not_exists_async<AK, AV>(&self, key: AK, value: AV) where AK: Into<Arc<K>> + Send + 'static, AV: Into<Arc<V>> + Send + 'static { ... } fn insert_async_with_callback<AK, AV, F, FU>( &self, key: AK, value: AV, f: F ) where AK: Into<Arc<K>> + Send + 'static, AV: Into<Arc<V>> + Send + 'static, F: FnOnce(Result<Option<CachedEntry<K, V>>>) -> FU + Send + 'static, FU: Future<Output = ()> + Send + 'static { ... } fn insert_if_not_exists_async_with_callback<AK, AV, F, FU>( &self, key: AK, value: AV, f: F ) where AK: Into<Arc<K>> + Send + 'static, AV: Into<Arc<V>> + Send + 'static, F: FnOnce(Result<bool>) -> FU + Send + 'static, FU: Future<Output = ()> + Send + 'static { ... } }

Provided Methods§

source

fn insert_async<AK, AV>(&self, key: AK, value: AV)
where AK: Into<Arc<K>> + Send + 'static, AV: Into<Arc<V>> + Send + 'static,

source

fn insert_if_not_exists_async<AK, AV>(&self, key: AK, value: AV)
where AK: Into<Arc<K>> + Send + 'static, AV: Into<Arc<V>> + Send + 'static,

source

fn insert_async_with_callback<AK, AV, F, FU>(&self, key: AK, value: AV, f: F)
where AK: Into<Arc<K>> + Send + 'static, AV: Into<Arc<V>> + Send + 'static, F: FnOnce(Result<Option<CachedEntry<K, V>>>) -> FU + Send + 'static, FU: Future<Output = ()> + Send + 'static,

source

fn insert_if_not_exists_async_with_callback<AK, AV, F, FU>( &self, key: AK, value: AV, f: F )
where AK: Into<Arc<K>> + Send + 'static, AV: Into<Arc<V>> + Send + 'static, F: FnOnce(Result<bool>) -> FU + Send + 'static, FU: Future<Output = ()> + Send + 'static,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<K, V, S> AsyncStorageExt<K, V> for S
where K: StorageKey, V: StorageValue, S: Storage<K, V>,