Module dcts

Module dcts 

Source
Expand description

Implementation of Dcts (DcText short) serialization.

Encodes sequences of Document Character (Dc) IDs to canonical Dcts text representation:

  • Plain text characters become literal Unicode (except @ which becomes @@).
  • Short Dcs are formatted as @{id}@.
  • Formats are formatted as @f{id}@.
  • Unicode escapes outside standard scalar characters are @u{hex}@.
  • Local node references (Dc 296 followed by a numeral) are @L{number}@.
  • Long Dcs are @l{id}@.

Structs§

DctsOptions
Options for Dcts serialization.

Functions§

dclist_to_dcts
Serializes a sequence of Document Character IDs (&[u128]) to Dcts format bytes using default options.
dclist_to_dcts_string_with_options
Serializes a sequence of Document Character IDs (&[u128]) to a Dcts String using the specified formatting options.
dclist_to_dcts_with_options
Serializes a sequence of Document Character IDs (&[u128]) to Dcts format bytes using the specified options.
parse_dcts_strict_to_dc_chars
Parses strict Dcts text (&[u8]) into a sequence of DcChars.