parsely-rs 0.1.6

Macro-based struct serialization/deserialization
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use parsely_rs::*;

#[derive(ParselyWrite)]
struct Foo {
    one: bool,
    two: u3,
}

fn main() {
    let mut bits_mut = BitsMut::new();
    let foo = Foo {
        one: true,
        two: u3::new(4),
    };

    Foo::write::<NetworkOrder>(&foo, &mut bits_mut, ()).unwrap();
}