Jason Macnak | efaa095 | 2019-12-12 22:33:33 +0000 | [diff] [blame] | 1 | bitflags |
| 2 | ======== |
| 3 | |
Joel Galenson | f9c300d | 2021-09-22 14:30:25 -0700 | [diff] [blame] | 4 | [](https://github.com/bitflags/bitflags/actions) |
Jason Macnak | efaa095 | 2019-12-12 22:33:33 +0000 | [diff] [blame] | 5 | [](https://gitter.im/bitflags/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge) |
| 6 | [](https://crates.io/crates/bitflags) |
| 7 | [](https://docs.rs/bitflags) |
Jason Macnak | efaa095 | 2019-12-12 22:33:33 +0000 | [diff] [blame] | 8 |  |
| 9 | |
| 10 | A Rust macro to generate structures which behave like a set of bitflags |
| 11 | |
| 12 | - [Documentation](https://docs.rs/bitflags) |
| 13 | - [Release notes](https://github.com/bitflags/bitflags/releases) |
| 14 | |
| 15 | ## Usage |
| 16 | |
| 17 | Add this to your `Cargo.toml`: |
| 18 | |
| 19 | ```toml |
| 20 | [dependencies] |
Joel Galenson | f9c300d | 2021-09-22 14:30:25 -0700 | [diff] [blame] | 21 | bitflags = "1.3" |
Jason Macnak | efaa095 | 2019-12-12 22:33:33 +0000 | [diff] [blame] | 22 | ``` |
| 23 | |
Joel Galenson | f9c300d | 2021-09-22 14:30:25 -0700 | [diff] [blame] | 24 | and this to your source code: |
Jason Macnak | efaa095 | 2019-12-12 22:33:33 +0000 | [diff] [blame] | 25 | |
| 26 | ```rust |
Joel Galenson | f9c300d | 2021-09-22 14:30:25 -0700 | [diff] [blame] | 27 | use bitflags::bitflags; |
Jason Macnak | efaa095 | 2019-12-12 22:33:33 +0000 | [diff] [blame] | 28 | ``` |
| 29 | |
| 30 | ## Rust Version Support |
| 31 | |
Joel Galenson | f9c300d | 2021-09-22 14:30:25 -0700 | [diff] [blame] | 32 | The minimum supported Rust version is 1.46 due to use of associated constants and const functions. |