CBOR Next
Library to encode and decode a Concise Binary Object Representation (CBOR)
| License | Crates Version | Docs |
|---|---|---|
Features
- Complete support for all major CBOR types (unsigned, signed, floating integers, bytes, text, array, map, tag, boolean, null, undefined and other simple value)
- RFC 8949 compliant
- Deterministic encoding support via
DeterministicMode - Encoding/Decoding to and from CBOR binary format
Installation
Add cbor_next to your Cargo.toml
= "0.2.0"
Usage
Main building block of library is DataItem Enum which represent a different type CBOR data item
Encoding
use DataItem;
let value = Unsigned;
let vector_data = vec!;
assert_eq!;
Decoding
use DataItem;
let vector_data = vec!;
let value = Unsigned;
assert_eq!;
For other usage check out docs Value enum and its methods and functions