Expand description
u8char provides the type u8char, which is similar to char but
represented internally as UTF-8 to allow lower-cost usage in conjunction
with str and String.
§Features
This package currently supports the feature unstable_niches, which is
disabled by default. This can be enabled only on nightly builds of Rust
and uses some perma-unstable features to try to make Option<u8char> have
the same size as u8char. Without this feature Option<u8char> will be
larger than u8char, whereas the Rust compiler knows that built-in char
only stores valid Unicode scalar values and Option<char> has the same
size as char.
Modules§
- error
- UTF-8 parse errors.
- iter
- Implementations of the
AsU8Charsextension trait. - stream
- Streaming parsing and translation of incoming UTF-8 bytes into
u8char. - util
- Additional helper functions that are used in the implementation of
crate::u8charand exported in case they are useful for “off-menu” uses of that type, such as when using unsafe code.
Structs§
- u8char
- A representation of a Unicode scalar value that has the same representation
as if the same scalar value were used as part of a
str.