pub fn serialize<B, S>(
    flags: &B,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where B: Flags, S: Serializer, <B as Flags>::Bits: WriteHex + Serialize,
Expand description

Serialize a set of flags as a human-readable string or their underlying bits.

Any unknown bits will be retained.