Enum hyper_boring::MaybeHttpsStream
source · pub enum MaybeHttpsStream<T> {
Http(T),
Https(SslStream<T>),
}
Expand description
A stream which may be wrapped with TLS.
Variants§
Trait Implementations§
source§impl<T> AsyncRead for MaybeHttpsStream<T>
impl<T> AsyncRead for MaybeHttpsStream<T>
source§impl<T> AsyncWrite for MaybeHttpsStream<T>
impl<T> AsyncWrite for MaybeHttpsStream<T>
source§fn poll_write(
self: Pin<&mut Self>,
ctx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, ctx: &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>, ctx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, ctx: &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>,
ctx: &mut Context<'_>
) -> Poll<Result<()>>
fn poll_shutdown( self: Pin<&mut Self>, ctx: &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
source§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 moresource§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
Determines if this writer has an efficient
poll_write_vectored
implementation. Read moresource§impl<T> Connection for MaybeHttpsStream<T>where
T: Connection,
impl<T> Connection for MaybeHttpsStream<T>where
T: Connection,
Auto 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