byteable 0.36.0

A Rust crate for convenient serialization and deserialization of byte-oriented data.
Documentation
#![cfg(all(feature = "std", feature = "derive"))]

use std::io::Cursor;

use byteable::Byteable;
use byteable::io::WriteValue;

#[derive(Byteable, Debug, PartialEq)]
#[byteable(io_only)]
struct MixedStruct {
    #[byteable(big_endian)]
    port: u16,
    payload: Vec<u8>,
}

#[test]
fn example() {
    let a = MixedStruct {
        port: 30,
        payload: vec![1, 2, 3],
    };

    let mut c = Cursor::new(Vec::new());
    c.write_value(&a).unwrap();
    println!("{:?}", c);
}