Enum futures_rustls::TlsStream
source · pub enum TlsStream<T> {
Client(TlsStream<T>),
Server(TlsStream<T>),
}
Expand description
Unified TLS stream type
This abstracts over the inner client::TlsStream
and server::TlsStream
, so you can use
a single type to keep both client- and server-initiated TLS-encrypted connections.
Variants§
Implementations§
Trait Implementations§
source§impl<T> AsyncRead for TlsStream<T>where
T: AsyncRead + AsyncWrite + Unpin,
impl<T> AsyncRead for TlsStream<T>where T: AsyncRead + AsyncWrite + Unpin,
source§impl<T> AsyncWrite for TlsStream<T>where
T: AsyncRead + AsyncWrite + Unpin,
impl<T> AsyncWrite for TlsStream<T>where T: AsyncRead + AsyncWrite + Unpin,
source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8] ) -> Poll<Result<usize>>
Attempt to write bytes from
buf
into the object. Read moresource§fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
Attempt to flush the object, ensuring that any buffered data reach
their destination. Read more