bitsandbytes 0.3.2

An owned, bit-aware binary codec: fast bit/byte field types and the unified #[bin] macro.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// All fields are whole bytes, so the cursor never leaves byte boundaries and the
// bit-stream codec is the wrong tool. The derive must reject this at compile time
// and steer the author to `#[binrw]`/`#[wire]`.
use bnb::BitDecode;

#[derive(BitDecode)]
struct AllByteAligned {
    a: u8,
    b: u16,
}

fn main() {}