nuts-bytes: Conversion into a binary data format.
The nuts-bytes
crate implements a tool that converts structured data into a
binary format.
API documentation
The API documentation is located here.
Format specification
The binary format is specified in docs/format.md.
Deserialization example
use ;
// deserialize a primitive (u32)
let mut reader = new;
let n: u32 = reader.read.unwrap;
assert_eq!;
// Not enough data available
let mut reader = new;
let err = reader..unwrap_err;
assert!;
Serialization example
use Writer;
// serialize a primitive (u32)
let mut writer = new;
writer.write.unwrap;
assert_eq!;
License
You can check out the full license here.
This project is licensed under the terms of the MIT license.