Expand description
This crate provides macros to generate bitfield-like struct.
See the documentation of the macros for how to use them.
Examples and tests are also a great way to understand how to use these macros.
Macros§
- bitfield
- Combines
bitfield_bitrange
andbitfield_fields
. - bitfield_
bitrange - Implements
BitRange
andBitRangeMut
for a tuple struct (or “newtype”). - bitfield_
constructor - Implements an exhaustive constructor function for a bitfield. Should only be called by
bitfield!
when usingimpl new;
- bitfield_
debug - Generates a
fmt::Debug
implementation. - bitfield_
fields - Declares the fields of a struct.
- bitfield_
impl - Generates and dispatches trait implementations for a struct
Traits§
- Bit
- A trait to get a single bit.
- BitMut
- A trait to set a single bit.
- BitRange
- A trait to get ranges of bits.
- BitRange
Mut - A trait to set ranges of bits.