Trait Factory

Source
pub trait Factory {
    // Required method
    fn get<'life0, 'async_trait>(
        &'life0 self,
        addr: String,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Client + Send>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Factory is the abstraction that allows different Client to be used by the cluster crate::cluster::state

Required Methods§

Source

fn get<'life0, 'async_trait>( &'life0 self, addr: String, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Client + Send>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

the factory method that receiving an addr String and returns a trait object for Client

Implementors§