Expand description
DcTF and legacy DcUtf / “UTF-8e-128” encoding and decoding (UTF-8 extended to 128-bit integers)
Constants§
- MAX_
DCTF_ LEN - Maximum byte length of a
DcTF(.dctf,f641) character sequence (23 bytes for 128-bit values).
Traits§
- Decode
Dcutf IpcClient Ext - Auto-generated IPC client extension for this method.
- Decode
IpcClient Ext - Auto-generated IPC client extension for this method.
- Encode
Dcutf IpcClient Ext - Auto-generated IPC client extension for this method.
- Encode
IpcClient Ext - Auto-generated IPC client extension for this method.
Functions§
- decode
- Lossily decode the first character from
bytesusing the DcTF format. - decode_
dctf - Decodes one
DcTF(.dctf,f641) codepoint frombytes, or returns(0xFFFD, error_len)using maximal-subpart error recovery on ill-formed input. - decode_
dctf_ buf - Decodes one
DcTF(.dctf,f641) character from the provided byte slice. - decode_
dcutf - Lossily decode the first character from
bytesusing the legacy DcUtf (utf_8e_128) format. - decode_
utf_ 8e_ 128 - Decodes one generalized UTF-8 codepoint from bytes.
Returns Some((value,
length_consumed)), or the replacement character on error. - decode_
utf_ 8e_ 128_ buf - Decodes one UTF‑8 / UTF‑8e‑128 codepoint from the provided byte slice.
On success returns Some((value,
length_consumed)), else None. Enforces canonical (no overlong) encodings for both standard and extended forms. - determine_
dctf_ error_ len - Computes the maximal-subpart error length for an invalid or incomplete
DcTF(.dctf,f641) byte slice. - determine_
utf_ 8e_ 128_ error_ len - Computes the maximal-subpart error length for an invalid or incomplete legacy
UTF-8e-128(DcUtf,f89) byte slice. - encode
- Encode a u128 codepoint using the DcTF format.
- encode_
dctf - Encodes
codepointinDcTF(.dctf,f641) and returns aVec<u8>. - encode_
dctf_ buf - Encodes a 128-bit Document Character / integer value using the
DcTF(.dctf,f641) scheme. - encode_
dcutf - Encode a u128 codepoint using the
utf_8e_128format. - encode_
utf_ 8e_ 128 - Generalized UTF-8 encoding for u128.
Returns a
Vec<u8>containing the encoded bytes. - encode_
utf_ 8e_ 128_ buf - Encodes a Unicode scalar value or an extended (> U+10FFFF) 128‑bit integer using the UTF‑8e‑128 scheme.
- len_
dctf - Returns the encoded byte length of
codepointinDcTF(.dctf,f641). - len_
utf_ 8e_ 128 - Returns the encoded byte length of
codepointin legacyUTF-8e-128(DcUtf,f89).