Crate preserves

source ·
Expand description
cargo add preserves

This crate (preserves on crates.io) implements Preserves for Rust. It provides the core semantics as well as both the human-readable text syntax (a superset of JSON) and machine-oriented binary format (including canonicalization) for Preserves.

This crate is the foundation for others such as

It also includes Serde support (modules de, ser, symbol, set).

§What is Preserves?

Preserves is a data model, with associated serialization formats.

It supports records with user-defined labels, embedded references, and the usual suite of atomic and compound data types, including binary data as a distinct type from text strings. Its annotations allow separation of data from metadata such as comments, trace information, and provenance information.

Preserves departs from many other data languages in defining how to compare two values. Comparison is based on the data model, not on syntax or on data structures of any particular implementation language.

Modules§

  • Support for Serde deserialization of Preserves terms described by Rust data types.
  • Serde and plain-Preserves codec errors.
  • Utilities for producing and flexibly parsing strings containing hexadecimal binary data.
  • Support for Serde serialization of Rust data types into Preserves terms.
  • Serde support for serializing Rust collections as Preserves sets.
  • Serde support for serializing Rust data as Preserves symbols.
  • Representing, reading, and writing Preserves Values as Rust data

Macros§

  • Convenience syntax for efficiently constructing Preserves record values.