BackendFactory

Trait BackendFactory 

Source
pub trait BackendFactory {
    type Error: Error;
    type Backend: Backend<Self::Error>;

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

A backend ‘factory’ that acts as a constructor for backends.

Required Associated Types§

Required Methods§

Source

fn create<'life0, 'async_trait>( &'life0 self, config: Uri, ) -> Pin<Box<dyn Future<Output = Result<Self::Backend, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Essentially a new function.

Implementors§