auto-bitflags 1.0.3

macro to automatically generate bitflags.
Documentation
  • Coverage
  • 75%
    3 out of 4 items documented1 out of 1 items with examples
  • Size
  • Source code size: 5.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.13 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Matt8898

Build Status

auto-bitflags


auto-bitflags is a rust macro to automatically generate bitflags.


Usage

#[macro_use]
extern crate auto_bitflags;

auto-bitflags!(u32, FLAG1, FLAG2);
fn main() {
   assert_eq!(0b11, FLAG_FLAG1 | FLAG_FLAG2);
   let flag12 = FLAG_FLAG1 | FLAG_FLAG2;
   assert_eq!(0b1, flag12 & FLAG_FLAG2);
   assert_eq!(0b10, flag12 & FLAG_FLAG1);
}