Skip to main content

Adapter

Trait Adapter 

Source
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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§