xref: /third_party/rust/crates/bitflags/README.md (revision 74522d2c)
174522d2cSopenharmony_cibitflags
274522d2cSopenharmony_ci========
374522d2cSopenharmony_ci
474522d2cSopenharmony_ci[![Rust](https://github.com/bitflags/bitflags/workflows/Rust/badge.svg)](https://github.com/bitflags/bitflags/actions)
574522d2cSopenharmony_ci[![Join the chat at https://gitter.im/bitflags/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bitflags/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge)
674522d2cSopenharmony_ci[![Latest version](https://img.shields.io/crates/v/bitflags.svg)](https://crates.io/crates/bitflags)
774522d2cSopenharmony_ci[![Documentation](https://docs.rs/bitflags/badge.svg)](https://docs.rs/bitflags)
874522d2cSopenharmony_ci![License](https://img.shields.io/crates/l/bitflags.svg)
974522d2cSopenharmony_ci
1074522d2cSopenharmony_ciA Rust macro to generate structures which behave like a set of bitflags
1174522d2cSopenharmony_ci
1274522d2cSopenharmony_ci- [Documentation](https://docs.rs/bitflags)
1374522d2cSopenharmony_ci- [Release notes](https://github.com/bitflags/bitflags/releases)
1474522d2cSopenharmony_ci
1574522d2cSopenharmony_ci## Usage
1674522d2cSopenharmony_ci
1774522d2cSopenharmony_ciAdd this to your `Cargo.toml`:
1874522d2cSopenharmony_ci
1974522d2cSopenharmony_ci```toml
2074522d2cSopenharmony_ci[dependencies]
2174522d2cSopenharmony_cibitflags = "1.3"
2274522d2cSopenharmony_ci```
2374522d2cSopenharmony_ci
2474522d2cSopenharmony_ciand this to your source code:
2574522d2cSopenharmony_ci
2674522d2cSopenharmony_ci```rust
2774522d2cSopenharmony_ciuse bitflags::bitflags;
2874522d2cSopenharmony_ci```
2974522d2cSopenharmony_ci
3074522d2cSopenharmony_ci## Rust Version Support
3174522d2cSopenharmony_ci
3274522d2cSopenharmony_ciThe minimum supported Rust version is 1.46 due to use of associated constants and const functions.
33