pub enum MaybeHttpsStream<T> {
Http(T),
Https(TokioIo<TlsStream<TokioIo<T>>>),
}
Expand description
A stream that might be protected with TLS.
Variants§
Http(T)
A stream over plain text.
Https(TokioIo<TlsStream<TokioIo<T>>>)
A stream protected with TLS.
Trait Implementations§
source§impl<T: Read + Write + Connection + Unpin> Connection for MaybeHttpsStream<T>
impl<T: Read + Write + Connection + Unpin> Connection for MaybeHttpsStream<T>
source§impl<T: Debug> Debug for MaybeHttpsStream<T>
impl<T: Debug> Debug for MaybeHttpsStream<T>
source§impl<T> From<T> for MaybeHttpsStream<T>
impl<T> From<T> for MaybeHttpsStream<T>
source§impl<T: Write + Read + Unpin> Write for MaybeHttpsStream<T>
impl<T: Write + Read + Unpin> Write for MaybeHttpsStream<T>
source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
buf
into the destination. Read moresource§fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to flush the object. Read more
source§fn poll_shutdown(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_shutdown( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to shut down this writer.
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
Returns whether this writer has an efficient
poll_write_vectored
implementation. Read moreAuto Trait Implementations§
impl<T> Freeze for MaybeHttpsStream<T>where
T: Freeze,
impl<T> !RefUnwindSafe for MaybeHttpsStream<T>
impl<T> Send for MaybeHttpsStream<T>where
T: Send,
impl<T> Sync for MaybeHttpsStream<T>where
T: Sync,
impl<T> Unpin for MaybeHttpsStream<T>where
T: Unpin,
impl<T> !UnwindSafe for MaybeHttpsStream<T>
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