Skip to main content

Module utf8

Module utf8 

Source
Expand description

Types for UTF-8 code unit sequences and their parts.

Macrosยง

byte_impls ๐Ÿ”’
byte_methods ๐Ÿ”’
lead_impls ๐Ÿ”’
non_ascii_impls ๐Ÿ”’
sequence_impls ๐Ÿ”’
sequence_methods ๐Ÿ”’
to_lead_for_multi_byte ๐Ÿ”’
to_non_ascii ๐Ÿ”’

Structsยง

FourByteSequence
Four-byte UTF-8 sequence
PreparedThreeBytes
Wrapper for the first three bytes and a precomputed value.
PreparedTwoBytes
Wrapper for the first two bytes and a precomputed value.
ThreeByteSequence
Three-byte UTF-8 sequence
TwoByteSequence
Two-byte UTF-8 sequence
Utf8ByteError
A type for signaling UTF-8 errors.
Utf8Data ๐Ÿ”’

Enumsยง

Ascii
A byte in the ASCII range (single-byte UTF-8 sequence).
LeadForFourByte
A lead byte for a four-byte UTF-8 sequence (0xF0 to 0xF4, inclusive)
LeadForMultiByte
A lead byte for a multibyte sequence (two-byte, three-byte, or four-byte).
LeadForThreeByte
A lead byte for a three-byte UTF-8 sequence (0xE0 to 0xEF, inclusive)
LeadForTwoByte
A lead byte for a two-byte UTF-8 sequence (0xC2 to 0xDF, inclusive)
NonAscii
A byte in the non-ASCII range.
UnconstrainedContinuation
An unconstrained UTF-8 continuation byte (0x80 to 0xBF, inclusive)

Staticsยง

UTF8_DATA ๐Ÿ”’
The first 256 entries are for looking up second. The rest are for looking up first on the assumption that first is not ASCII.

Traitsยง

Seal ๐Ÿ”’
For making sure that reviewing this file is sufficient for reviewing the implementations of Utf8ByteSequence.
Utf8ByteSequence
Marker trait for all four UTF-8 byte sequences