Expand description
Library for encoding Rust program data into a binary stream, and decoding that stream.
Example:
let expected = ("one".to_string(), 2.0, vec![3, 4], vec![5u8]);
let stream = tbon::en::encode(&expected).unwrap();
let actual = block_on(tbon::de::try_decode((), stream)).unwrap();
assert_eq!(expected, actual);Compatibility notes:
- Decoding enforces a maximum nesting depth of 1024 by default; use
tbon::de::decode_with_max_depth/tbon::de::try_decode_with_max_depthto override.