Enum hyper_tls::MaybeHttpsStream
source · 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: Write + Read + Connection + Unpin> Connection for MaybeHttpsStream<T>
impl<T: Write + Read + 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_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.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>where
T: RefUnwindSafe,
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>where
T: 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