domain::net::client::protocol

Trait AsyncConnect

source
pub trait AsyncConnect {
    type Connection;
    type Fut: Future<Output = Result<Self::Connection, Error>> + Send + Sync;

    // Required method
    fn connect(&self) -> Self::Fut;
}
Expand description

Establish a connection asynchronously.

Required Associated Types§

source

type Connection

The type of an established connection.

source

type Fut: Future<Output = Result<Self::Connection, Error>> + Send + Sync

The future establishing the connection.

Required Methods§

source

fn connect(&self) -> Self::Fut

Returns a future that establishing a connection.

Implementors§