Trait Loader

Source
pub trait Loader {
    type Value;
    type Error;

    // Required method
    fn load<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Value, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Something that can perform a single load operation.

Required Associated Types§

Source

type Value

The value to load.

Source

type Error

The error we can encounter while loading.

Required Methods§

Source

fn load<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Self::Value, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Load the value.

Implementors§