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
//! Every `#[bitflags]` field is one flag and must be `bool`.

use bnb::bitflags;

#[bitflags(u8)]
#[derive(Clone, Copy)]
struct F {
    a: bool,
    b: u8, // not a `bool` — each flag is a single bit
}

fn main() {}