#[repr(transparent)]
pub struct Utf8Str(_);
Expand description

UTF-8 string slice.

This type supports efficient conversion to and from the str type. It is provided primarily for consistency with the other string types.

Implementations

Convert a string slice to a Utf8.

Convert a slice of bytes to a Utf8.

Access this data as a str.

This view is possible because the str type represents a UTF-8 encoded sequence of bytes, just as Utf8 does.

Converts a slice of bytes to a Utf8 without validating that the slice contains valid UTF-8 encoded data.

Access the elements of this UTF-8 string as a slice of u8 elements.

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

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
Converts the given value to a String. Read more