Skip to main content

ClientDuplex

Trait ClientDuplex 

Source
pub trait ClientDuplex:
    AsyncRead
    + AsyncWrite
    + Send
    + Unpin { }
Expand description

Trait alias for the duplex stream types Connection::from_stream accepts, such as TcpStream and tokio_rustls::client::TlsStream.

The trait is boxed so callers can hand in different stream types through one path.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: AsyncRead + AsyncWrite + Send + Unpin + ?Sized> ClientDuplex for T