pub enum MaybeTls<R, T> {
    Raw(R),
    Tls(T),
}Expand description
A type wrapper for objects that can exist in either a raw state or wrapped by TLS handling.
Variants§
Implementations§
Source§impl MaybeTls<(), TlsSettings>
 
impl MaybeTls<(), TlsSettings>
pub async fn bind( &self, addr: &SocketAddr, ) -> Result<MaybeTlsListener, TlsError>
pub async fn bind_with_allowlist( &self, addr: &SocketAddr, allow_origin: Vec<IpNet>, ) -> Result<MaybeTlsListener, TlsError>
Source§impl MaybeTls<(), TlsSettings>
 
impl MaybeTls<(), TlsSettings>
Source§impl MaybeTls<(), TlsSettings>
 
impl MaybeTls<(), TlsSettings>
pub fn enable_client() -> Result<MaybeTls<(), TlsSettings>, TlsError>
pub fn tls_client( config: Option<&TlsConfig>, ) -> Result<MaybeTls<(), TlsSettings>, TlsError>
Sourcepub fn from_config(
    config: Option<&TlsEnableableConfig>,
    for_server: bool,
) -> Result<MaybeTls<(), TlsSettings>, TlsError>
 
pub fn from_config( config: Option<&TlsEnableableConfig>, for_server: bool, ) -> Result<MaybeTls<(), TlsSettings>, TlsError>
Generate an optional settings struct from the given optional
configuration reference. If config is None, TLS is
disabled. The for_server parameter indicates the options
should be interpreted as being for a TLS server, which requires
an identity certificate and changes the certificate verification
default to false.
pub const fn http_protocol_name(&self) -> &'static str
Source§impl MaybeTls<TcpStream, SslStream<TcpStream>>
 
impl MaybeTls<TcpStream, SslStream<TcpStream>>
pub fn peer_addr(&self) -> Result<SocketAddr, Error>
pub fn set_keepalive( &mut self, keepalive: TcpKeepaliveConfig, ) -> Result<(), Error>
pub fn set_send_buffer_bytes(&mut self, bytes: usize) -> Result<(), Error>
pub fn set_receive_buffer_bytes(&mut self, bytes: usize) -> Result<(), Error>
Trait Implementations§
Source§impl<R, T> AsyncWrite for MaybeTls<R, T>where
    R: AsyncWrite,
    T: AsyncWrite,
 
impl<R, T> AsyncWrite for MaybeTls<R, T>where
    R: AsyncWrite,
    T: AsyncWrite,
Source§fn poll_write(
    self: Pin<&mut MaybeTls<R, T>>,
    cx: &mut Context<'_>,
    buf: &[u8],
) -> Poll<Result<usize, Error>>
 
fn poll_write( self: Pin<&mut MaybeTls<R, T>>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>
Attempt to write bytes from 
buf into the object. Read moreSource§fn poll_flush(
    self: Pin<&mut MaybeTls<R, T>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
 
fn poll_flush( self: Pin<&mut MaybeTls<R, T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to flush the object, ensuring that any buffered data reach
their destination. Read more
Source§fn poll_shutdown(
    self: Pin<&mut MaybeTls<R, T>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
 
fn poll_shutdown( self: Pin<&mut MaybeTls<R, T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Initiates or attempts to shut down this writer, returning success when
the I/O connection has completely shut down. Read more
§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 more§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 From<TlsSettings> for MaybeTls<(), TlsSettings>
 
impl From<TlsSettings> for MaybeTls<(), TlsSettings>
Source§fn from(tls: TlsSettings) -> MaybeTls<(), TlsSettings>
 
fn from(tls: TlsSettings) -> MaybeTls<(), TlsSettings>
Converts to this type from the input type.
impl<'pin, R, T> Unpin for MaybeTls<R, T>where
    <PinnedFieldsOfHelperStruct<__MaybeTls<'pin, R, T>> as PinnedFieldsOfHelperTrait>::Actual: Unpin,
Auto Trait Implementations§
impl<R, T> Freeze for MaybeTls<R, T>
impl<R, T> RefUnwindSafe for MaybeTls<R, T>where
    R: RefUnwindSafe,
    T: RefUnwindSafe,
impl<R, T> Send for MaybeTls<R, T>
impl<R, T> Sync for MaybeTls<R, T>
impl<R, T> UnwindSafe for MaybeTls<R, T>where
    R: UnwindSafe,
    T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AfterReadExt for Twhere
    T: AsyncRead + AsyncWrite,
 
impl<T> AfterReadExt for Twhere
    T: AsyncRead + AsyncWrite,
fn after_read<F>(self, after_read: F) -> AfterRead<T, F>
§impl<T> ArchivePointee for T
 
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
 
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
    _: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
 
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<R> AsyncReadExt for Rwhere
    R: AsyncRead + ?Sized,
 
impl<R> AsyncReadExt for Rwhere
    R: AsyncRead + ?Sized,
§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
    Self: Unpin,
 
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
    Self: Unpin,
Pulls some bytes from this source into the specified buffer,
returning how many bytes were read. Read more
§fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
 
fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
Pulls some bytes from this source into the specified buffer,
advancing the buffer’s internal cursor. Read more
§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
    Self: Unpin,
 
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
    Self: Unpin,
Reads the exact number of bytes required to fill 
buf. Read more§fn read_u8(&mut self) -> ReadU8<&mut Self>where
    Self: Unpin,
 
fn read_u8(&mut self) -> ReadU8<&mut Self>where
    Self: Unpin,
Reads an unsigned 8 bit integer from the underlying reader. Read more
§fn read_i8(&mut self) -> ReadI8<&mut Self>where
    Self: Unpin,
 
fn read_i8(&mut self) -> ReadI8<&mut Self>where
    Self: Unpin,
Reads a signed 8 bit integer from the underlying reader. Read more
§fn read_u16(&mut self) -> ReadU16<&mut Self>where
    Self: Unpin,
 
fn read_u16(&mut self) -> ReadU16<&mut Self>where
    Self: Unpin,
Reads an unsigned 16-bit integer in big-endian order from the
underlying reader. Read more
§fn read_i16(&mut self) -> ReadI16<&mut Self>where
    Self: Unpin,
 
fn read_i16(&mut self) -> ReadI16<&mut Self>where
    Self: Unpin,
Reads a signed 16-bit integer in big-endian order from the
underlying reader. Read more
§fn read_u32(&mut self) -> ReadU32<&mut Self>where
    Self: Unpin,
 
fn read_u32(&mut self) -> ReadU32<&mut Self>where
    Self: Unpin,
Reads an unsigned 32-bit integer in big-endian order from the
underlying reader. Read more
§fn read_i32(&mut self) -> ReadI32<&mut Self>where
    Self: Unpin,
 
fn read_i32(&mut self) -> ReadI32<&mut Self>where
    Self: Unpin,
Reads a signed 32-bit integer in big-endian order from the
underlying reader. Read more
§fn read_u64(&mut self) -> ReadU64<&mut Self>where
    Self: Unpin,
 
fn read_u64(&mut self) -> ReadU64<&mut Self>where
    Self: Unpin,
Reads an unsigned 64-bit integer in big-endian order from the
underlying reader. Read more
§fn read_i64(&mut self) -> ReadI64<&mut Self>where
    Self: Unpin,
 
fn read_i64(&mut self) -> ReadI64<&mut Self>where
    Self: Unpin,
Reads an signed 64-bit integer in big-endian order from the
underlying reader. Read more
§fn read_u128(&mut self) -> ReadU128<&mut Self>where
    Self: Unpin,
 
fn read_u128(&mut self) -> ReadU128<&mut Self>where
    Self: Unpin,
Reads an unsigned 128-bit integer in big-endian order from the
underlying reader. Read more
§fn read_i128(&mut self) -> ReadI128<&mut Self>where
    Self: Unpin,
 
fn read_i128(&mut self) -> ReadI128<&mut Self>where
    Self: Unpin,
Reads an signed 128-bit integer in big-endian order from the
underlying reader. Read more
§fn read_f32(&mut self) -> ReadF32<&mut Self>where
    Self: Unpin,
 
fn read_f32(&mut self) -> ReadF32<&mut Self>where
    Self: Unpin,
Reads an 32-bit floating point type in big-endian order from the
underlying reader. Read more
§fn read_f64(&mut self) -> ReadF64<&mut Self>where
    Self: Unpin,
 
fn read_f64(&mut self) -> ReadF64<&mut Self>where
    Self: Unpin,
Reads an 64-bit floating point type in big-endian order from the
underlying reader. Read more
§fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>where
    Self: Unpin,
 
fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>where
    Self: Unpin,
Reads an unsigned 16-bit integer in little-endian order from the
underlying reader. Read more
§fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>where
    Self: Unpin,
 
fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>where
    Self: Unpin,
Reads a signed 16-bit integer in little-endian order from the
underlying reader. Read more
§fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>where
    Self: Unpin,
 
fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>where
    Self: Unpin,
Reads an unsigned 32-bit integer in little-endian order from the
underlying reader. Read more
§fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>where
    Self: Unpin,
 
fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>where
    Self: Unpin,
Reads a signed 32-bit integer in little-endian order from the
underlying reader. Read more
§fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>where
    Self: Unpin,
 
fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>where
    Self: Unpin,
Reads an unsigned 64-bit integer in little-endian order from the
underlying reader. Read more
§fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>where
    Self: Unpin,
 
fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>where
    Self: Unpin,
Reads an signed 64-bit integer in little-endian order from the
underlying reader. Read more
§fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>where
    Self: Unpin,
 
fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>where
    Self: Unpin,
Reads an unsigned 128-bit integer in little-endian order from the
underlying reader. Read more
§fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>where
    Self: Unpin,
 
fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>where
    Self: Unpin,
Reads an signed 128-bit integer in little-endian order from the
underlying reader. Read more
§fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>where
    Self: Unpin,
 
fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>where
    Self: Unpin,
Reads an 32-bit floating point type in little-endian order from the
underlying reader. Read more
§fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>where
    Self: Unpin,
 
fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>where
    Self: Unpin,
Reads an 64-bit floating point type in little-endian order from the
underlying reader. Read more
§fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>where
    Self: Unpin,
 
fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>where
    Self: Unpin,
Reads all bytes until EOF in this source, placing them into 
buf. Read more§fn read_to_string<'a>(
    &'a mut self,
    dst: &'a mut String,
) -> ReadToString<'a, Self>where
    Self: Unpin,
 
fn read_to_string<'a>(
    &'a mut self,
    dst: &'a mut String,
) -> ReadToString<'a, Self>where
    Self: Unpin,
Reads all bytes until EOF in this source, appending them to 
buf. Read more§impl<W> AsyncWriteExt for Wwhere
    W: AsyncWrite + ?Sized,
 
impl<W> AsyncWriteExt for Wwhere
    W: AsyncWrite + ?Sized,
§fn write<'a>(&'a mut self, src: &'a [u8]) -> Write<'a, Self>where
    Self: Unpin,
 
fn write<'a>(&'a mut self, src: &'a [u8]) -> Write<'a, Self>where
    Self: Unpin,
Writes a buffer into this writer, returning how many bytes were
written. Read more
§fn write_vectored<'a, 'b>(
    &'a mut self,
    bufs: &'a [IoSlice<'b>],
) -> WriteVectored<'a, 'b, Self>where
    Self: Unpin,
 
fn write_vectored<'a, 'b>(
    &'a mut self,
    bufs: &'a [IoSlice<'b>],
) -> WriteVectored<'a, 'b, Self>where
    Self: Unpin,
§fn write_buf<'a, B>(&'a mut self, src: &'a mut B) -> WriteBuf<'a, Self, B>
 
fn write_buf<'a, B>(&'a mut self, src: &'a mut B) -> WriteBuf<'a, Self, B>
Writes a buffer into this writer, advancing the buffer’s internal
cursor. Read more
§fn write_all_buf<'a, B>(
    &'a mut self,
    src: &'a mut B,
) -> WriteAllBuf<'a, Self, B>
 
fn write_all_buf<'a, B>( &'a mut self, src: &'a mut B, ) -> WriteAllBuf<'a, Self, B>
Attempts to write an entire buffer into this writer. Read more
§fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self>where
    Self: Unpin,
 
fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self>where
    Self: Unpin,
Attempts to write an entire buffer into this writer. Read more
§fn write_u8(&mut self, n: u8) -> WriteU8<&mut Self>where
    Self: Unpin,
 
fn write_u8(&mut self, n: u8) -> WriteU8<&mut Self>where
    Self: Unpin,
Writes an unsigned 8-bit integer to the underlying writer. Read more
§fn write_i8(&mut self, n: i8) -> WriteI8<&mut Self>where
    Self: Unpin,
 
fn write_i8(&mut self, n: i8) -> WriteI8<&mut Self>where
    Self: Unpin,
Writes a signed 8-bit integer to the underlying writer. Read more
§fn write_u16(&mut self, n: u16) -> WriteU16<&mut Self>where
    Self: Unpin,
 
fn write_u16(&mut self, n: u16) -> WriteU16<&mut Self>where
    Self: Unpin,
Writes an unsigned 16-bit integer in big-endian order to the
underlying writer. Read more
§fn write_i16(&mut self, n: i16) -> WriteI16<&mut Self>where
    Self: Unpin,
 
fn write_i16(&mut self, n: i16) -> WriteI16<&mut Self>where
    Self: Unpin,
Writes a signed 16-bit integer in big-endian order to the
underlying writer. Read more
§fn write_u32(&mut self, n: u32) -> WriteU32<&mut Self>where
    Self: Unpin,
 
fn write_u32(&mut self, n: u32) -> WriteU32<&mut Self>where
    Self: Unpin,
Writes an unsigned 32-bit integer in big-endian order to the
underlying writer. Read more
§fn write_i32(&mut self, n: i32) -> WriteI32<&mut Self>where
    Self: Unpin,
 
fn write_i32(&mut self, n: i32) -> WriteI32<&mut Self>where
    Self: Unpin,
Writes a signed 32-bit integer in big-endian order to the
underlying writer. Read more
§fn write_u64(&mut self, n: u64) -> WriteU64<&mut Self>where
    Self: Unpin,
 
fn write_u64(&mut self, n: u64) -> WriteU64<&mut Self>where
    Self: Unpin,
Writes an unsigned 64-bit integer in big-endian order to the
underlying writer. Read more
§fn write_i64(&mut self, n: i64) -> WriteI64<&mut Self>where
    Self: Unpin,
 
fn write_i64(&mut self, n: i64) -> WriteI64<&mut Self>where
    Self: Unpin,
Writes an signed 64-bit integer in big-endian order to the
underlying writer. Read more
§fn write_u128(&mut self, n: u128) -> WriteU128<&mut Self>where
    Self: Unpin,
 
fn write_u128(&mut self, n: u128) -> WriteU128<&mut Self>where
    Self: Unpin,
Writes an unsigned 128-bit integer in big-endian order to the
underlying writer. Read more
§fn write_i128(&mut self, n: i128) -> WriteI128<&mut Self>where
    Self: Unpin,
 
fn write_i128(&mut self, n: i128) -> WriteI128<&mut Self>where
    Self: Unpin,
Writes an signed 128-bit integer in big-endian order to the
underlying writer. Read more
§fn write_f32(&mut self, n: f32) -> WriteF32<&mut Self>where
    Self: Unpin,
 
fn write_f32(&mut self, n: f32) -> WriteF32<&mut Self>where
    Self: Unpin,
Writes an 32-bit floating point type in big-endian order to the
underlying writer. Read more
§fn write_f64(&mut self, n: f64) -> WriteF64<&mut Self>where
    Self: Unpin,
 
fn write_f64(&mut self, n: f64) -> WriteF64<&mut Self>where
    Self: Unpin,
Writes an 64-bit floating point type in big-endian order to the
underlying writer. Read more
§fn write_u16_le(&mut self, n: u16) -> WriteU16Le<&mut Self>where
    Self: Unpin,
 
fn write_u16_le(&mut self, n: u16) -> WriteU16Le<&mut Self>where
    Self: Unpin,
Writes an unsigned 16-bit integer in little-endian order to the
underlying writer. Read more
§fn write_i16_le(&mut self, n: i16) -> WriteI16Le<&mut Self>where
    Self: Unpin,
 
fn write_i16_le(&mut self, n: i16) -> WriteI16Le<&mut Self>where
    Self: Unpin,
Writes a signed 16-bit integer in little-endian order to the
underlying writer. Read more
§fn write_u32_le(&mut self, n: u32) -> WriteU32Le<&mut Self>where
    Self: Unpin,
 
fn write_u32_le(&mut self, n: u32) -> WriteU32Le<&mut Self>where
    Self: Unpin,
Writes an unsigned 32-bit integer in little-endian order to the
underlying writer. Read more
§fn write_i32_le(&mut self, n: i32) -> WriteI32Le<&mut Self>where
    Self: Unpin,
 
fn write_i32_le(&mut self, n: i32) -> WriteI32Le<&mut Self>where
    Self: Unpin,
Writes a signed 32-bit integer in little-endian order to the
underlying writer. Read more
§fn write_u64_le(&mut self, n: u64) -> WriteU64Le<&mut Self>where
    Self: Unpin,
 
fn write_u64_le(&mut self, n: u64) -> WriteU64Le<&mut Self>where
    Self: Unpin,
Writes an unsigned 64-bit integer in little-endian order to the
underlying writer. Read more
§fn write_i64_le(&mut self, n: i64) -> WriteI64Le<&mut Self>where
    Self: Unpin,
 
fn write_i64_le(&mut self, n: i64) -> WriteI64Le<&mut Self>where
    Self: Unpin,
Writes an signed 64-bit integer in little-endian order to the
underlying writer. Read more
§fn write_u128_le(&mut self, n: u128) -> WriteU128Le<&mut Self>where
    Self: Unpin,
 
fn write_u128_le(&mut self, n: u128) -> WriteU128Le<&mut Self>where
    Self: Unpin,
Writes an unsigned 128-bit integer in little-endian order to the
underlying writer. Read more
§fn write_i128_le(&mut self, n: i128) -> WriteI128Le<&mut Self>where
    Self: Unpin,
 
fn write_i128_le(&mut self, n: i128) -> WriteI128Le<&mut Self>where
    Self: Unpin,
Writes an signed 128-bit integer in little-endian order to the
underlying writer. Read more
§fn write_f32_le(&mut self, n: f32) -> WriteF32Le<&mut Self>where
    Self: Unpin,
 
fn write_f32_le(&mut self, n: f32) -> WriteF32Le<&mut Self>where
    Self: Unpin,
Writes an 32-bit floating point type in little-endian order to the
underlying writer. Read more
§fn write_f64_le(&mut self, n: f64) -> WriteF64Le<&mut Self>where
    Self: Unpin,
 
fn write_f64_le(&mut self, n: f64) -> WriteF64Le<&mut Self>where
    Self: Unpin,
Writes an 64-bit floating point type in little-endian order to the
underlying writer. Read more
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> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<T> Conv for T
 
impl<T> Conv for T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
 
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
    &self,
    deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
 
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> FmtForward for T
 
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
    Self: Binary,
 
fn fmt_binary(self) -> FmtBinary<Self>where
    Self: Binary,
Causes 
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
    Self: Display,
 
fn fmt_display(self) -> FmtDisplay<Self>where
    Self: Display,
Causes 
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
    Self: LowerExp,
 
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
    Self: LowerExp,
Causes 
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
    Self: LowerHex,
 
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
    Self: LowerHex,
Causes 
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
    Self: Octal,
 
fn fmt_octal(self) -> FmtOctal<Self>where
    Self: Octal,
Causes 
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
    Self: Pointer,
 
fn fmt_pointer(self) -> FmtPointer<Self>where
    Self: Pointer,
Causes 
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
    Self: UpperExp,
 
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
    Self: UpperExp,
Causes 
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
    Self: UpperHex,
 
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
    Self: UpperHex,
Causes 
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
    &'a Self: for<'a> IntoIterator,
 
fn fmt_list(self) -> FmtList<Self>where
    &'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
 
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> 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> IntoRequest<T> for T
 
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
 
fn into_request(self) -> Request<T>
Wrap the input message 
T in a tonic::RequestCreates a shared type from an unshared type.
§impl<T> LayoutRaw for T
 
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
 
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
§impl<Source, Target> OctetsInto<Target> for Sourcewhere
    Target: OctetsFrom<Source>,
 
impl<Source, Target> OctetsInto<Target> for Sourcewhere
    Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
§fn try_octets_into(
    self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
 
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
§fn octets_into(self) -> Targetwhere
    Self::Error: Into<Infallible>,
 
fn octets_into(self) -> Targetwhere
    Self::Error: Into<Infallible>,
Performs an infallible conversion.
§impl<D> OwoColorize for D
 
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
    C: Color,
 
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
    C: Color,
Set the foreground color generically Read more
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
    C: Color,
 
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
    C: Color,
Set the background color generically. Read more
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
 
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to magenta
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
 
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Change the foreground color to the terminal default
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
 
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Change the background color to the terminal default
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
 
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Change the foreground color to bright black
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
 
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Change the background color to bright black
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
 
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Change the foreground color to bright red
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
 
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Change the background color to bright red
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
 
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Change the foreground color to bright green
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
 
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Change the background color to bright green
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
 
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Change the foreground color to bright yellow
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
 
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Change the background color to bright yellow
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
 
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Change the foreground color to bright blue
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
 
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Change the background color to bright blue
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
 
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright magenta
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
 
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright magenta
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
 
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright purple
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
 
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright purple
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
 
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Change the foreground color to bright cyan
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
 
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Change the background color to bright cyan
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
 
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Change the foreground color to bright white
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
 
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Change the background color to bright white
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
 
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Make the text blink (but fast!)
Hide the text
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
 
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Cross out the text
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
 
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either [
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
 
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either [
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
    &self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
 
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
    &self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
 
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the background color to a specific RGB value.
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
 
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Sets the foreground color to an RGB value.
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
 
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Sets the background color to an RGB value.
§fn if_supports_color<'a, Out, ApplyFn>(
    &'a self,
    stream: impl Into<Stream>,
    apply: ApplyFn,
) -> SupportsColorsDisplay<'a, Self, Out, ApplyFn>where
    ApplyFn: Fn(&'a Self) -> Out,
 
fn if_supports_color<'a, Out, ApplyFn>(
    &'a self,
    stream: impl Into<Stream>,
    apply: ApplyFn,
) -> SupportsColorsDisplay<'a, Self, Out, ApplyFn>where
    ApplyFn: Fn(&'a Self) -> Out,
Apply a given transformation function to all formatters if the given stream
supports at least basic ANSI colors, allowing you to conditionally apply
given styles/colors. Read more
§impl<T> Pipe for Twhere
    T: ?Sized,
 
impl<T> Pipe for Twhere
    T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
    Self: Sized,
 
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
    Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
    R: 'a,
 
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
    R: 'a,
Borrows 
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
    R: 'a,
 
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
    R: 'a,
Mutably borrows 
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
 
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
    &'a mut self,
    func: impl FnOnce(&'a mut B) -> R,
) -> R
 
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
 
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows 
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
 
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows 
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
 
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows 
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
 
impl<T> Pointable for T
§impl<T> Tap for T
 
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
 
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the 
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
 
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the 
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
 
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the 
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
 
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the 
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
 
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the 
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
 
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the 
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
 
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls 
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
 
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls 
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
 
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls 
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
 
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls 
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
 
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls 
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
 
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls 
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
 
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls 
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TokioAsyncReadCompatExt for Twhere
    T: AsyncRead,
 
impl<T> TokioAsyncReadCompatExt for Twhere
    T: AsyncRead,
§impl<T> TokioAsyncWriteCompatExt for Twhere
    T: AsyncWrite,
 
impl<T> TokioAsyncWriteCompatExt for Twhere
    T: AsyncWrite,
§fn compat_write(self) -> Compat<Self>where
    Self: Sized,
 
fn compat_write(self) -> Compat<Self>where
    Self: Sized,
Wraps 
self with a compatibility layer that implements
futures_io::AsyncWrite.§impl<T> TryConv for T
 
impl<T> TryConv for T
Source§impl<S> VecAsyncReadExt for Swhere
    S: AsyncRead,
 
impl<S> VecAsyncReadExt for Swhere
    S: AsyncRead,
Source§fn allow_read_until<F>(self, until: F) -> AllowReadUntil<Self, F>
 
fn allow_read_until<F>(self, until: F) -> AllowReadUntil<Self, F>
Read data from this reader until the given future resolves.