Crate encode_unicode
source · [−]Expand description
Miscellaneous UTF-8 and UTF-16 types and methods.
Optional features:
-
#![no_std]
-mode: There are a few differences:Error
doesn’t exist, butdescription()
is made available as an inherent impl.Extend
/FromIterator
-implementations forString
/Vec<u8>
/Vec<u16>
are missing.- There is no
io
, soUtf8Iterator
andUtf8CharSplitter
doesn’t implementRead
.
This feature is enabled by setting
default-features=false
inCargo.toml
:encode_unicode = {version="0.3.4", default-features=false}
-
Integration with the ascii crate:
ConvertUtf8Char
andUtf16Char
to and fromascii::AsciiChar
.
Minimum supported Rust version
The minimum supported Rust version for 1.0.* releases is 1.56.
Later 1.y.0 releases might require newer Rust versions, but the three most
recent stable releases at the time of publishing will always be supported.
For example this means that if the current stable Rust version is 1.66 when
encode_unicode
1.1.0 is released, then encode_unicode
1.1.* will
not require a newer Rust version than 1.63.
Modules
Errors returned by various conversion methods in this crate.
Iterator types that you should rarely need to name
Structs
Traits
Extension trait for char
that adds methods for converting to and from UTF-8 or UTF-16.
Iterator methods that convert between u8
s and Utf8Char
or u16
s and Utf16Char
Methods for iterating over u8
and u16
slices as UTF-8 or UTF-16 characters.
Adds .utf8chars()
and .utf16chars()
iterator constructors to &str
.
Methods for working with u8
s as UTF-8 bytes.
Methods for working with u16
s as UTF-16 units.