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
13
14
//! A `#[br(temp)]` field is read into a local but not stored, so on the write side
//! it has no `self` value — it needs `#[bw(calc = …)]`. Omitting it is an error.
use bnb::bin;

#[bin]
struct Frame {
    tag: bnb::u4,
    #[br(temp)]
    count: u16,
    #[br(count = count)]
    data: Vec<u8>,
}

fn main() {}