Trait MakeConnection

trait MakeConnection<Target>: Sealed<(Target)>

The MakeConnection trait is used to create transports.

The goal of this service is to allow composable methods for creating AsyncRead + AsyncWrite transports. This could mean creating a TLS based connection or using some other method to authenticate the connection.

Associated Types

type Connection: TraitBound { trait_: Path { path: "AsyncRead", id: Id(1575), args: None }, generic_params: [], modifier: None } + TraitBound { trait_: Path { path: "AsyncWrite", id: Id(1576), args: None }, generic_params: [], modifier: None }

The transport provided by this service

type Error

Errors produced by the connecting service

type Future: TraitBound { trait_: Path { path: "Future", id: Id(175), args: Some(AngleBracketed { args: [], constraints: [AssocItemConstraint { name: "Output", args: None, binding: Equality(Type(ResolvedPath(Path { path: "Result", id: Id(33), args: Some(AngleBracketed { args: [Type(QualifiedPath { name: "Connection", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(1579), args: None }) }), Type(QualifiedPath { name: "Error", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(1579), args: None }) })], constraints: [] }) }))) }] }) }, generic_params: [], modifier: None }

The future that eventually produces the transport

Required Methods

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>

Returns Poll::Ready(Ok(())) when it is able to make more connections.

fn make_connection(self: &mut Self, target: Target) -> <Self as >::Future

Connect and return a transport asynchronously

Implementors