Skip to main content

Module handler

Module handler 

Source
Expand description

UTF-8 decoding with pluggable handler for the four byte sequence lengths and error.

The handler implementation is expected not to mutate any state. Its primary purpose is to allow read-only data structure lookups to be fused into the decoder when the data structure layout benefits from knowing more UTF-8 structure detail than char provides.

Structs§

Utf8CharsWithHandler
Iterator by char over &[u8] that contains potentially-invalid UTF-8 with a handler for the four kinds of byte sequences (or error). See the crate documentation.

Constants§

SEQUENCE_FOR_REPLACEMENT_CHARACTER 🔒

Traits§

Utf8Handler
Mapping from the four kinds of byte sequences or error to output.