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§

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

Macros§

rec
Convenience syntax for efficiently constructing Preserves record values.

Functions§

preserves_package_version
Retrieve the version of the Preserves crate.