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
//! `count_prefix` generates the length field and the count expression itself, so a
//! directive that reads, stores, or replaces that machinery on the same field conflicts.
use bnb::bin;

#[bin]
struct Frame {
    tag: bnb::u4,
    n: u8,
    #[brw(count_prefix = u16)]
    #[br(count = n)]
    items: Vec<u8>,
}

fn main() {}