#[no_std]
implementation of typed bitfield access for u8
, u16
, u32
, u64
and usize
.
``` use mju_bits::*;
struct RegisterMarker;
type Register = Storage
let mut reg = Register::new();
reg.set::
The Storage type ensures that a field may only be used with its corresponding storage.
For example, this won't compile:
```compilefail use mju_bits::*;
struct FooMarker;
type Foo = Storage
struct BarMarker;
type Bar = Storage
let bar = Bar::new();
// Compiler error: FooField can not be used with Bar storage.
bar.get::
B0
..B63
aliases to avoid confusion with typenum::B0
and typenum::B1