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
preserves-schema
, which implements Preserves Schema;preserves-path
, which implements Preserves Path; andpreserves-tools
, which provides command-line utilities for working with Preserves, in particularpreserves-tool
, a kind of Preserves Swiss-army knife.
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
Value
s as Rust data
Macros§
Functions§
- preserves_
package_ version - Retrieve the version of the Preserves crate.