Skip to content

Commit

Permalink
Document serialize_as_list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lymia committed May 1, 2023
1 parent 0c79b7d commit cb8d73a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions enumset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ use crate::repr::EnumSetTypeRepr;
///
/// * `#[enumset(serialize_repr = "u8")]` may be used to specify the integer type used to serialize
/// the underlying bitset. Any type allowed in the `repr` option may be used in this option.
/// * `#[enumset(serialize_as_list)]` may be used to serialize the bitset as a list of enum
/// variants instead of an integer. This requires [`Deserialize`] and [`Serialize`] be
/// implemented on the enum.
/// * `#[enumset(serialize_as_list)]` may be used to serialize the set as a list of enum variants
/// instead of an integer. This requires [`Deserialize`] and [`Serialize`] be implemented on the
/// enum.
/// * `#[enumset(serialize_as_map)]` may be used to serialize the set as a map of enum variants to
/// boolean values. A element is considered present in the set if the boolean value is `true`.
/// This requires [`Deserialize`] and [`Serialize`] be implemented on the enum.
/// * `#[enumset(serialize_deny_unknown)]` causes the generated deserializer to return an error
/// for unknown bits instead of silently ignoring them.
///
Expand Down

0 comments on commit cb8d73a

Please sign in to comment.