Type Alias vector_core::tls::MaybeTlsStream
source · pub type MaybeTlsStream<S> = MaybeTls<S, SslStream<S>>;
Aliased Type§
enum MaybeTlsStream<S> {
Raw(S),
Tls(SslStream<S>),
}
Variants§
Implementations§
source§impl MaybeTlsStream<TcpStream>
impl MaybeTlsStream<TcpStream>
pub fn peer_addr(&self) -> Result<SocketAddr, Error>
pub fn set_keepalive(&mut self, keepalive: TcpKeepaliveConfig) -> Result<()>
pub fn set_send_buffer_bytes(&mut self, bytes: usize) -> Result<()>
pub fn set_receive_buffer_bytes(&mut self, bytes: usize) -> Result<()>
Trait Implementations
source§impl<R: AsyncWrite, T: AsyncWrite> AsyncWrite for MaybeTls<R, T>
impl<R: AsyncWrite, T: AsyncWrite> AsyncWrite for MaybeTls<R, T>
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<()>>
Attempts to flush the object, ensuring that any buffered data reach
their destination. Read more
source§fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
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 more