pub enum UnicodeEncodingError {
NoError,
InvalidCodepointTooManyBits,
InvalidUtf8Prefix,
IncoherentUtf8Codepoint,
InvalidStreamSize,
AmbiguousUnpairedSurrogates,
UnpairedSurrogateNotification,
MissingEncodedBytes,
}
Variants§
NoError
Indicate an absence of error from a function checking for errors.
InvalidCodepointTooManyBits
Indicate that bits above the 21th bit in a code-point are not empty. This means that the code-point is invalid.
InvalidUtf8Prefix
Indicate that a byte in an UTF-8 stream of bytes does not start with a valid prefix. This might means that the data are not encoded in UTF-8…
IncoherentUtf8Codepoint
Indicate that the number of bytes in a glyph is not coherent with the prefix used in the first byte if the glyph.
InvalidStreamSize
Indicate that there is not the right numbers of bytes in a stream of input bytes. For example, an input that should have been UTF-32 does not contain a number of bytes that is a multiple of 4.
AmbiguousUnpairedSurrogates
Two code-points that would be unpaired surrogates as UTF-16 are next to each others, thus this would be ambiguous ti use as UTF-16.
UnpairedSurrogateNotification
Used internally to managed unpaired surrogate.
MissingEncodedBytes
For variable length encoding such as UTF-8, there is not enough bytes to finish a glyph.