Struct xcb::Lat1String
source · [−]pub struct Lat1String { /* private fields */ }
Expand description
A struct owning a Latin-1 (aka. ISO 8859-1) string.
See Lat1Str for details.
Implementations
Construct a Lat1String from a slice of bytes.
Construct a Lat1String from UTF-8 (a conversion to Latin-1 is performed).
Methods from Deref<Target = Lat1Str>
Returns the string as slice of bytes.
Returns the string in UTF-8 encoding, only if the string is pure ASCII.
Otherwise, a Lat1Error::NonAscii
is returned.
Returns the string in UTF-8 encoding, only if the string is pure ASCII.
Panics
This function panics if the string contains non-ASCII chars.
Returns the string in UTF-8 encoding.
Safety
If the string contains non-ASCII characters, the returned string will be invalid UTF-8.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Lat1String
impl Send for Lat1String
impl Sync for Lat1String
impl Unpin for Lat1String
impl UnwindSafe for Lat1String
Blanket Implementations
Mutably borrows from an owned value. Read more