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§
fn insert_async<AK, AV>(&self, key: AK, value: AV)
fn insert_if_not_exists_async<AK, AV>(&self, key: AK, value: AV)
fn insert_async_with_callback<AK, AV, F, FU>(&self, key: AK, value: AV, f: F)
fn insert_if_not_exists_async_with_callback<AK, AV, F, FU>( &self, key: AK, value: AV, f: F )
Object Safety§
This trait is not object safe.