bitable 0.1.0

An all-const, compile-time checked, safe bit handling library with zero runtime overhead
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub use crate::bit::*;

pub const U8_OFFSET: u8 = 3;
pub const U16_OFFSET: u8 = 10;
pub const U32_OFFSET: u8 = 24;
pub const U64_OFFSET: u8 = 33;

pub const U8_BIT: Flag<U8_OFFSET> = Flag::<U8_OFFSET>::new();
pub const U16_BIT: Flag<U16_OFFSET> = Flag::<U16_OFFSET>::new();
pub const U32_BIT: Flag<U32_OFFSET> = Flag::<U32_OFFSET>::new();
pub const U64_BIT: Flag<U64_OFFSET> = Flag::<U64_OFFSET>::new();

pub const LENGTH: u8 = 5;

// pub const BITFIELD: BitField = BitField::new(U8_OFFSET, LENGTH);