simple_parse

crates.io mio Lines of Code

This crate is heavily based of deku with the bit level precision removed.

Usage

```Rust use simple_parse::{SpRead, SpWrite};

[derive(Debug, SpRead, SpWrite)]

pub struct SomeStruct { somefield: u8, numdwords: u16, #[sp(count="num_dwords", endian="big")] dwords: Vec, }

/// <...>

let (rest, mut res) = SomeStruct::frombytes(byteslice)?; res.dwords.push(0x12345678); let generatedbytes = res.tobytes()?;

```

For complete examples see : examples