Trait async_map::AsyncMap

source ·
pub trait AsyncMap: Clone + Send {
    type Key: AsyncKey;
    type Value: AsyncStorable;

    // Required methods
    fn get_if_present(&self, key: &Self::Key) -> Option<Self::Value>;
    fn get<'a, 'b, B: FactoryBorrow<Self::Key, Self::Value>>(
        &'a self,
        key: &'a Self::Key,
        factory: B
    ) -> Pin<Box<dyn Future<Output = Self::Value> + Send + 'b>>;
}

Required Associated Types§

Required Methods§

source

fn get_if_present(&self, key: &Self::Key) -> Option<Self::Value>

source

fn get<'a, 'b, B: FactoryBorrow<Self::Key, Self::Value>>( &'a self, key: &'a Self::Key, factory: B ) -> Pin<Box<dyn Future<Output = Self::Value> + Send + 'b>>

Implementors§

source§

impl<K: AsyncKey, V: AsyncStorable> AsyncMap for NonLockingMap<K, V>

§

type Key = K

§

type Value = V

source§

impl<K: AsyncKey, V: AsyncStorable> AsyncMap for VersionedMap<K, V>

§

type Key = K

§

type Value = V