Function to_writer
fn to_writer<B: Flags, impl Write: Write>(flags: &B, writer: impl Write) -> Result<(), fmt::Error>
where
<B as >::Bits: WriteHex
Write a flags value as text.
Any bits that aren't part of a contained flag will be formatted as a hex number.