Skip to content

Commit 6f6d797

Browse files
arcnmxmeithecatte
authored andcommitted
Document existence of the serde feature
1 parent 31f2100 commit 6f6d797

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ extern crate enumflags2;
2828
- [x] Has a similar API compared to the popular [bitflags](https://crates.io/crates/bitflags) crate.
2929
- [x] Does not expose the generated types explicity. The user interacts exclusively with `struct BitFlags<Enum>;`.
3030
- [x] The debug formatter prints the binary flag value as well as the flag enums: `BitFlags(0b1111, [A, B, C, D])`.
31+
- [x] Optional support for serialization with the [`serde`](https://serde.rs/) feature flag.
3132

3233
### Example
3334

enumflags/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
//! assert!(!(a_b.intersects(Test::C | Test::D)));
4141
//! }
4242
//! ```
43+
//!
44+
//! ## Optional Feature Flags
45+
//!
46+
//! - [`serde`](https://serde.rs/) implements `Serialize` and `Deserialize` for `BitFlags<T>`.
4347
#![warn(missing_docs)]
4448
#![cfg_attr(not(test), no_std)]
4549

0 commit comments

Comments
 (0)