Skip to main content

cbor_ld/
lib.rs

1//! A Rust CBOR-LD 1.0 processor.
2//!
3//! The implementation follows the W3C CBOR-LD 1.0 tag structure
4//! `51997([registryEntryId, payload])` and uses [`cbor2::Value`] as the
5//! dynamic JSON-LD / CBOR-LD data model. Registry entry `0` is encoded without
6//! semantic compression; all other registry IDs use the default CBOR-LD
7//! semantic compression algorithms with caller-provided registry type tables.
8
9mod constants;
10mod error;
11mod processor;
12mod table;
13
14pub use constants::CBOR_LD_TAG;
15pub use error::{Error, Result};
16pub use processor::{
17    DecodeOptions, EncodeOptions, decode, decode_with_loader, encode, encode_with_loader,
18};
19pub use table::{TableKey, TypeTable};
20
21#[cfg(test)]
22mod tests;