Registry / utility / enumflags2

enumflags2

JSON →
library0.7.12rscratesunverified

Enum-based bit flags for Rust, allowing type-safe bitmask operations.

utility
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.

use enumflags2::BitFlags;

Defines and uses bit flags with an enum.

use enumflags2::{BitFlags, bitflags}; #[bitflags] #[repr(u8)] #[derive(Copy, Clone, Debug)] enum MyFlags { A = 1, B = 2, C = 4, } fn main() { let flags = BitFlags::A | BitFlags::B; println!("Flags: {:?}", flags); }
Debug
Known footguns

No known footguns recorded.

Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
12 hits · last 30 days
gptbot
3
claudebot
3
ahrefsbot
1
Resources