https://github.com/d3lio/bitmask
A bitmask generator for enum scoped bit flags.
https://github.com/d3lio/bitmask
bitflags enum rust
Last synced: 2 months ago
JSON representation
A bitmask generator for enum scoped bit flags.
- Host: GitHub
- URL: https://github.com/d3lio/bitmask
- Owner: d3lio
- License: apache-2.0
- Created: 2017-01-20T21:38:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-18T07:56:13.000Z (almost 7 years ago)
- Last Synced: 2025-11-22T09:02:13.442Z (3 months ago)
- Topics: bitflags, enum, rust
- Language: Rust
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bitmask
A bitmask generator for enum scoped bit flags
[Documentation](https://docs.rs/bitmask)
## Usage
Add `bitmask` as a dependency in your `Cargo.toml`:
```toml
[dependency]
bitmask = "^0.5.0"
```
Then add this snippet to your crate's root:
```rust
#[macro_use]
extern crate bitmask;
```
## Features
Bitmask supports one feature: `std`. This is enabled by default, and will draw
in the standard library and also automatically derive of `Hash` and `Debug` for
generated types. If you prefer not to derive these features, then ensure you
do not enable the default features.
## Examples
Run a specific example with `cargo run --example `.
## Similar crates
* [bitflags!](https://crates.io/crates/bitflags)