pub trait Adapter: Send + Sync {
    type Remote: Remote;
    type Local: Local<Remote = Self::Remote>;
}
Expand description

High level trait to represent an adapter for a transport protocol. The adapter is only used to identify the resources of your adapter.

Required Associated Types§

source

type Remote: Remote

Resource type used to identify remote connections and send/receive from remote this endpoints (e.g. TcpStream) This can be considerered the resource used for client connections.

source

type Local: Local<Remote = Self::Remote>

Resource type used to accept new connections (e.g. TcpListener) This can be considerered the resource used for server listenings.

Implementors§