Skip to main content

Transport

Trait Transport 

Source
pub trait Transport: AsyncRead + AsyncWrite {
    // Required method
    fn remote_addr(&self) -> Option<SocketAddr>;
}
Expand description

Transport trait that supports the remote (peer) address.

Required Methods§

Source

fn remote_addr(&self) -> Option<SocketAddr>

Returns the remote (peer) address of this connection.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Transport for AddrStream

Implementors§

Source§

impl Transport for TlsStream

Available on crate feature http2 only.
Source§

impl<T: AsyncRead + AsyncWrite + Unpin> Transport for LiftIo<T>