1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! # Babbel CBOR
//!
//! Fast, binary-safe, zero-copy RFC 8949 CBOR (Concise Binary Object Representation)
//! parser, serializer, and DOM engine in pure Rust.
//! Adheres strictly to the IETF CBOR standard and Babbel's SOLID architecture.
//!
//! CBOR maps with 100% fidelity to Babbel's universal [`Value`] AST:
//! - Null / Undefined -> `Value::Null`
//! - Boolean -> `Value::Bool`
//! - Unsigned & Negative integers -> `Value::Integer(i128)`
//! - 16-bit, 32-bit & 64-bit IEEE floats -> `Value::Float(f64)`
//! - UTF-8 Strings (definite & indefinite) -> `Value::String(String)`
//! - Byte arrays (definite & indefinite) -> `Value::Bytes(Vec<u8>)`
//! - Arrays (definite & indefinite) -> `Value::Array(Vec<Value>)`
//! - Maps (definite & indefinite) -> `Value::Object(Vec<(String, Value)>)`
//!
//! ## Quickstart
//!
//! ```rust
//! use babbel_cbor::{from_bytes, to_vec, CborEngine};
//! use babbel_core::Value;
//!
//! let original = Value::Object(vec![
//! ("standard".into(), Value::String("RFC 8949".into())),
//! ("compact".into(), Value::Bool(true)),
//! ]);
//!
//! let encoded = to_vec(&original).unwrap();
//! let decoded = from_bytes(&encoded).unwrap();
//! assert_eq!(original, decoded);
//! ```
extern crate alloc;
pub use Value;
pub use *;
pub use ;
pub use CborEngine;
pub use CborError;
pub use ;
pub use ;
pub use ;