pub struct Display<'a, S: ?Sized> { /* private fields */ }
Expand description

Helper struct for printing wide string values with format! and {}.

A wide string might contain ill-formed UTF encoding. This struct implements the Display trait in a way that decoding the string is lossy but no heap allocations are performed, such as by to_string_lossy. It is created by the display method on U16Str and U32Str.

By default, invalid Unicode data is replaced with U+FFFD REPLACEMENT CHARACTER (�). If you wish to simply skip any invalid Uncode data and forego the replacement, you may use the alternate formatting with {:#}.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Calls U::from(self).

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

Converts the given value to a String. Read more

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.