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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.