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§

§

Raw(S)

§

Tls(SslStream<S>)

Implementations§

source§

impl MaybeTlsStream<TcpStream>

source

pub fn peer_addr(&self) -> Result<SocketAddr, Error>

source

pub fn set_keepalive(&mut self, keepalive: TcpKeepaliveConfig) -> Result<()>

source

pub fn set_send_buffer_bytes(&mut self, bytes: usize) -> Result<()>

source

pub fn set_receive_buffer_bytes(&mut self, bytes: usize) -> Result<()>

source§

impl<R, T> MaybeTls<R, T>

source

pub const fn is_raw(&self) -> bool

source

pub const fn is_tls(&self) -> bool

source

pub const fn raw(&self) -> Option<&R>

source

pub const fn tls(&self) -> Option<&T>

Trait Implementations

source§

impl<R: AsyncRead, T: AsyncRead> AsyncRead for MaybeTls<R, T>

source§

fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>, ) -> Poll<Result<()>>

Attempts to read from the AsyncRead into buf. Read more
source§

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>>

Attempt to write bytes from buf into the object. Read more
source§

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<()>>

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>>

Like poll_write, except that it writes from a slice of buffers. Read more
§

fn is_write_vectored(&self) -> bool

Determines if this writer has an efficient poll_write_vectored implementation. Read more
source§

impl<R: Clone, T: Clone> Clone for MaybeTls<R, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R: Debug, T: Debug> Debug for MaybeTls<R, T>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<O> From<Option<O>> for MaybeTls<(), O>

source§

fn from(tls: Option<O>) -> Self

Converts to this type from the input type.
source§

impl<'pin, R, T> Unpin for MaybeTls<R, T>
where PinnedFieldsOf<__MaybeTls<'pin, R, T>>: Unpin,