modular-bitfield 0.13.1

Easily define bitfield types with modular building blocks.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use modular_bitfield::prelude::*;

// The integer value cannot be parsed into a `usize` since it is negative.
#[bitfield(bytes = -1)]
pub struct Base {
    a: B2,
    b: B6,
    c: u8,
    d: u32,
}

fn main() {}