rfc5321::traits

Trait AsyncReadAndWrite

source
pub trait AsyncReadAndWrite:
    AsyncRead
    + AsyncWrite
    + Debug
    + Unpin
    + Send
    + Sync {
    // Provided method
    fn try_dup(&self) -> Option<TcpStream> { ... }
}

Provided Methods§

source

fn try_dup(&self) -> Option<TcpStream>

Optionally clone a TcpStream that represents the same underlying stream as this one. This only has an impl that returns Some for TcpStream. It is present to facilitate a workaround for some awkwardness in the SslStream implementation for the failed-handshake case.

Implementations on Foreign Types§

source§

impl AsyncReadAndWrite for SslStream<BoxedAsyncReadAndWrite>

source§

impl AsyncReadAndWrite for SslStream<TcpStream>

source§

impl AsyncReadAndWrite for TcpStream

source§

fn try_dup(&self) -> Option<TcpStream>

source§

impl AsyncReadAndWrite for TlsStream<BoxedAsyncReadAndWrite>

source§

impl AsyncReadAndWrite for TlsStream<BoxedAsyncReadAndWrite>

source§

impl AsyncReadAndWrite for TlsStream<TcpStream>

source§

impl AsyncReadAndWrite for TlsStream<TcpStream>

source§

impl AsyncReadAndWrite for UnixStream

Implementors§