Registry / utility / modular-bitfield

modular-bitfield

JSON →
library0.13.1rscratesunverified

Easily define bitfield types with modular building blocks using a derive macro.

# Cargo.toml [dependencies] modular-bitfield = "0.13.1"
INSTALL
IMPORT
SIG · MODULAR-BITFIELD
M
modular-bitfield
utilityrustv0.13.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bitfield
use modular_bitfield::bitfield;

Defines a bitfield struct with fields of specified bit widths.

use modular_bitfield::prelude::*; #[bitfield] struct MyBitfield { a: B1, b: B3, c: B4, } fn main() { let bf = MyBitfield::new() .with_a(1) .with_b(5) .with_c(10); println!("Value: {:?}", bf); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.13.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
modular-bitfield — cargo add modular-bitfield · libregistry