Struct widestring::ustr::Display [−][src]
pub struct Display<'a, C: UChar> { /* fields omitted */ }
Expand description
Helper struct for printing UStr
values with format!
and {}
.
A UStr
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 UStr
.
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 {:#}
.