3 releases (breaking)
Uses old Rust 2015
0.3.0 | Sep 6, 2018 |
---|---|
0.2.0 | Jul 11, 2018 |
0.1.0 | Apr 11, 2018 |
#31 in #deserializer
20KB
547 lines
Serde CBOR Rust - no_std
Serde CBOR Rust is a CBOR Deserializers for Rust which runs in a no_std environment.
Currently only a deserializer is implemented and it only deserializes u8s and slices of u8s.
For a fully working implmentation use pyfisch's cbor
Usage
extern crate cbor_no_std
use cbor_no_std::from_slice;
println!("{:?}", from_slice::<Value>(b"\x83\x01\x02\x03").unwrap());
// => Array(1, 2, 3)
println!("{:?}", from_slice::<Value>(b"\x01").unwrap());
// => U64(1)
println!("{:?}", from_slice::<Value>(b"\x18\x2a").unwrap());
// => U64(42)