mvbitfield 0.1.1

Generates bitfield struct types that can insert and extract bit-aligned fields.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use mvbitfield::prelude::*;

bitfield! {
    struct BinaryWidth: 0b10 {
        x: 2,
    }

    struct OctalWidth: 0o10 {
        x: 8,
    }

    struct HexWidth: 0x10 {
        x: 16,
    }
}