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
15
//! A `#[derive(BitEnum)]` may have at most one `#[catch_all]` variant.

use bnb::{BitEnum, u4};

#[derive(BitEnum, Clone, Copy)]
#[bit_enum(u4)]
enum E {
    A,
    #[catch_all]
    X(u4),
    #[catch_all]
    Y(u4),
}

fn main() {}