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§
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>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.