[−][src]Crate modular_bitfield
Provides macros to support bitfield structs allowing for modular use of bit-enums.
The mainly provided macros are #[bitfield] for structs and
#[derive(BitfieldSpecifier)] for enums that shall be usable
within bitfield structs.
There are preset bitfield specifiers such as B1, B2,..,B64
that allow for easy bitfield usage in structs very similar to how
they work in C or C++.
- Performance of the macro generated code is as fast as its hand-written alternative.
- Compile-time checks allow for safe usage of bitfield structs and enums.
Re-exports
pub use modular_bitfield_impl::bitfield; |
pub use modular_bitfield_impl::BitfieldSpecifier; |
Modules
| prelude | The prelude: |
| specifiers | The default set of predefined specifiers. |
Traits
| Specifier | Trait implemented by all bitfield specifiers. |