Function x11rb_protocol::utils::pretty_printer::pretty_print_bitmask
source ยท pub(crate) fn pretty_print_bitmask(
fmt: &mut Formatter<'_>,
value: u32,
cases: &[(u32, &str, &str)],
) -> Result
Expand description
A helper to pretty-print a bitmask.
This function prints the given number. All bit-matches with the given variants are printed. Any left-over number is printed as a decimal.
In alternate mode, the second string in the given array is used, else the first.