Skip to main content

MultiFetch

Trait MultiFetch 

Source
pub trait MultiFetch<'a, K, V>: StorageBackend {
    type Iter: 'a + Iterator<Item = Result<Option<V>, Self::Error>>;

    // Required method
    fn multi_fetch(&'a self, keys: &'a [K]) -> Result<Self::Iter, Self::Error>;
}
Expand description

MultiFetch<'a, K, V> trait extends the StorageBackend with multi_fetch operation for the (key: K, value: V) pair; therefore, it should be explicitly implemented for the corresponding StorageBackend.

Required Associated Types§

Source

type Iter: 'a + Iterator<Item = Result<Option<V>, Self::Error>>

The iterator associated type over values.

Required Methods§

Source

fn multi_fetch(&'a self, keys: &'a [K]) -> Result<Self::Iter, Self::Error>

Fetches the values associated with the keys from the storage.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§