pingora_memory_cache

Trait 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.

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.

Implementors§