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> Connection for MaybeHttpsStream<T>where
T: Connection,
impl<T> Connection for MaybeHttpsStream<T>where
T: Connection,
Source§impl<T> Read for MaybeHttpsStream<T>
impl<T> Read for MaybeHttpsStream<T>
Source§impl<T> Write for MaybeHttpsStream<T>
impl<T> Write for MaybeHttpsStream<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 destination. 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. 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<()>>
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 moreimpl<'pin, T> Unpin for MaybeHttpsStream<T>where
__MaybeHttpsStream<'pin, T>: Unpin,
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> 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