pub trait Dialer<A: Data>: Clone + Send + 'static {
    type Connection: Splittable;
    type Error: Display + Send;

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

Can use addresses to connect to a peer.

Required Associated Types§

Required Methods§

source

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

Attempt to connect to a peer using the provided addressing information.

Object Safety§

This trait is not object safe.

Implementors§