Trait Backend

Source
pub trait Backend: Send + 'static {
    type Value: Value;
    type Error: Debug + Clone + Send;

    // Required method
    fn batch_load<'a, I>(
        &self,
        keys: I,
    ) -> Result<Vec<Self::Value>, Self::Error>
       where I: Iterator<Item = &'a <Self::Value as Value>::Key> + 'a;
}
Expand description

Trait for querier backend

Required Associated Types§

Required Methods§

Source

fn batch_load<'a, I>(&self, keys: I) -> Result<Vec<Self::Value>, Self::Error>
where I: Iterator<Item = &'a <Self::Value as Value>::Key> + 'a,

This function provides the actual data fetching logic.

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§