packed_bits 0.3.0

Zero-cost, const-friendly, no_std and memory efficient bit packing library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use packed_bits::packed_bits;

packed_bits!(
    OversizedFields: u8 {
        _a: 5,
        _b: 4,
    }
);

packed_bits!(
    RGB: u16 {
        red: 8,
        green: 8,
        blue: 8,
    }
);

fn main() {}