pub struct AsyncTlsStream<S>(/* private fields */);
Expand description
A wrapper around an underlying raw stream which implements the TLS or SSL protocol.
A TlsStream<S>
represents a handshake that has been completed successfully
and both the server and the client are ready for receiving and sending
data. Bytes read from a TlsStream
are decrypted from S
and bytes written
to a TlsStream
are encrypted when passing through to S
.
Implementations§
Trait Implementations§
source§impl<S> AsyncWrite for TlsStream<S>where
S: AsyncRead + AsyncWrite + Unpin,
impl<S> AsyncWrite for TlsStream<S>where
S: AsyncRead + AsyncWrite + Unpin,
source§fn poll_write(
self: Pin<&mut TlsStream<S>>,
ctx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut TlsStream<S>>, ctx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
buf
into the object. Read moresource§fn poll_flush(
self: Pin<&mut TlsStream<S>>,
ctx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut TlsStream<S>>, ctx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to flush the object, ensuring that any buffered data reach
their destination. Read more
source§fn poll_shutdown(
self: Pin<&mut TlsStream<S>>,
ctx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_shutdown( self: Pin<&mut TlsStream<S>>, ctx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Initiates or attempts to shut down this writer, returning success when
the I/O connection has completely shut down. Read more
§fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize, Error>>
fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>
Like
poll_write
, except that it writes from a slice of buffers. Read more§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
Determines if this writer has an efficient
poll_write_vectored
implementation. Read moreAuto Trait Implementations§
impl<S> Freeze for TlsStream<S>
impl<S> RefUnwindSafe for TlsStream<S>where
S: RefUnwindSafe,
impl<S> Send for TlsStream<S>where
S: Send,
impl<S> Sync for TlsStream<S>where
S: Sync,
impl<S> Unpin for TlsStream<S>where
S: Unpin,
impl<S> UnwindSafe for TlsStream<S>where
S: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more