Module strings

Module strings 

Source
Expand description

Module for string encoding and decoding.

Structs§

StringEncoder
Provide a configurable string encoder. This takes strings and produces an encoded version of the string. This complements the crate::strings::StringParser.
StringParser
Implement parsing of strings.

Enums§

EncodingMethod
Determine how Unicode characters that require encoding should be handled. If ASCII encoding is enabled, this only applies to characters that need encoding and are outside the ASCII range.
EncodingStandard
The standard used to determine which characters to encode as escapes.
EscapeType
Define the different escape types. These are used to interpret escape sequences found in strings and to determine how escapes are used when encoding.
IllegalUnicodeProtocol
How to handle parsing an invalid Unicode hexadecimal escape. This also applies to the escapes of a surrogate pair when surrogate pairs are not allowed.
StringStandard
These are the string standards that are implemented for the string parser and encoder. These select a “bundle” of options at once to configure how strings are parsed or encoded.
UnknownEscapeProtocol
How to handle parsing unknown or invalid escapes.

Constants§

UCD
The Unicode database.

Functions§

get_ucd
Construct the UCD and return it. This is a relatively costly operation and you should only do it once. Once you have done this you can keep it around and use it to initialize string parsers that handle named Unicode escapes. It is not needed otherwise.