struct BytesRef<'a>(&'a [u8]);
Expand description

BytesRef is not a part of public API of bytes crate.

Tuple Fields

0: &'a [u8]

Trait Implementations

Alternative implementation of std::fmt::Debug for byte slice.

Standard Debug implementation for [u8] is comma separated list of numbers. Since large amount of byte strings are in fact ASCII strings or contain a lot of ASCII strings (e. g. HTTP), it is convenient to print strings as ASCII when possible.

Formats the value using the given formatter. Read more

Formats the value using the given formatter.

Formats the value using the given formatter.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.