#[repr(transparent)]pub struct BStr { /* fields omitted */ }
A wrapper for &[u8]
that provides convenient string oriented trait impls.
If you need ownership or a growable byte string buffer, then use
BString
.
Using a &BStr
is just like using a &[u8]
, since BStr
implements Deref
to [u8]
. So all methods available on [u8]
are also available on BStr
.
A &BStr
has the same representation as a &str
. That is, a &BStr
is
a fat pointer which consists of a pointer to some bytes and a length.
The BStr
type has a number of trait implementations, and in particular,
defines equality and ordinal comparisons between &BStr
, &str
and
&[u8]
for convenience.
The Debug
implementation for BStr
shows its bytes as a normal string.
For invalid UTF-8, hex escape sequences are used.
The Display
implementation behaves as if BStr
were first lossily
converted to a str
. Invalid UTF-8 bytes are substituted with the Unicode
replacement codepoint, which looks like this: �.
Immutably borrows from an owned value. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Returns the “default value” for a type. Read more
The resulting type after dereferencing.
Mutably dereferences the value.
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
Performs the mutable indexing (container[index]
) operation.
Performs the mutable indexing (container[index]
) operation.
Performs the mutable indexing (container[index]
) operation.
Performs the mutable indexing (container[index]
) operation.
Performs the mutable indexing (container[index]
) operation.
Performs the mutable indexing (container[index]
) operation.
Performs the mutable indexing (container[index]
) operation.
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
Restrict a value to a certain interval. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Serialize this value into the given Serde serializer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more