BatchLoad

Trait BatchLoad 

Source
pub trait BatchLoad: Send + Sync {
    type Key: Send + Sync + Clone + Eq + Hash + Debug + 'static;
    type Value: Send + Sync + Clone + 'static;
    type Error: Send + Sync + From<String> + Display + 'static;

    // Required method
    fn load<'life0, 'life1, 'async_trait>(
        &'life0 self,
        keys: &'life1 [Self::Key],
    ) -> Pin<Box<dyn Future<Output = HashMap<Self::Key, Result<Self::Value, Self::Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Associated Types§

Source

type Key: Send + Sync + Clone + Eq + Hash + Debug + 'static

Source

type Value: Send + Sync + Clone + 'static

Source

type Error: Send + Sync + From<String> + Display + 'static

Required Methods§

Source

fn load<'life0, 'life1, 'async_trait>( &'life0 self, keys: &'life1 [Self::Key], ) -> Pin<Box<dyn Future<Output = HashMap<Self::Key, Result<Self::Value, Self::Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§