Trait pingora_memory_cache::MultiLookup

source ·
pub trait MultiLookup<K, T, S> {
    // Required method
    fn multi_lookup<'life0, 'life1, 'life2, 'async_trait>(
        keys: &'life0 [&'life1 K],
        extra: Option<&'life2 S>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<(T, Option<Duration>)>, Box<dyn ErrorTrait + Send + Sync>>> + Send + 'async_trait>>
       where K: 'async_trait,
             S: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

MultiLookup is similar to Lookup. Implement this trait if the system being queried support looking up multiple keys in a single API call.

Required Methods§

source

fn multi_lookup<'life0, 'life1, 'life2, 'async_trait>( keys: &'life0 [&'life1 K], extra: Option<&'life2 S>, ) -> Pin<Box<dyn Future<Output = Result<Vec<(T, Option<Duration>)>, Box<dyn ErrorTrait + Send + Sync>>> + Send + 'async_trait>>
where K: 'async_trait, S: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Like Lookup::lookup but for an arbitrary amount of keys.

Object Safety§

This trait is not object safe.

Implementors§