Crate swimos_recon

Crate swimos_recon 

Source
Expand description

Utilities for working with the Recon markup format.

This create provides a number of utilities for working with the Recon markup format. These consist of:

  • Recon parser.
  • Recon printer that will format types that support the swimos_form::Form trait to strings.
  • Comparator for Recon strings that does not require them to be deserialized.
  • Hash function for Recon strings (that will produce the same hash for strings that represent equal values).

Modules§

parser
Recon format parsers.

Structs§

HashError
A Recon hash could not be computed for a string as it did not contain valid Recon.
WithLenRecognizerDecoder
Length delimited wrapper around RecognizerDecoder. This decoder expects the length of the string to be consumed by the inner decoder to be written to the buffer as an unsigned, 64bit integer. The inner reader will not be permitted to read beyond the written length.
WithLenReconEncoder
Encodes a value as a Recon string following the length of the string as a 64 bit integer.

Functions§

compare_recon_values
Compare two recon values incrementally, terminating early if a difference is discovered.
print_recon
Print an inline Recon representation of StructuralWritable value.
print_recon_compact
Print a compact Recon representation of StructuralWritable value. The compact representation omits all possible spaces.
print_recon_pretty
Print a pretty Recon representation of StructuralWritable value. The pretty representation splits records over lines and indents their items.
recon_hash
Add the Recon hash for a string (if it contains valid Recon). Recon strings that represent the same Recon value will have the same hash.
write_recon