std::encoding::utf8Validating and lossy UTF-8 decoding with explicit byte-position errors.
decodeDecode UTF-8 bytes, returning the first byte-position error as ordinary
Result data. Valid input preserves every Unicode scalar, including NUL.
decode_lossyDecode UTF-8 bytes and replace malformed sequences with U+FFFD.
Utf8ErrorDetails of invalid UTF-8 in an encoded byte sequence.
Number of valid bytes before the invalid or incomplete sequence.
Invalid sequence length in bytes, or None for incomplete trailing input.