Fusuma

Components / Composite

marks

The marks of a list of flags as the bits the groups take (bit i is flags[i]; at most 32).

Try it

This is the Bars page of the gallery, running in your browser: marks is on it, and it is the real widget. Press Run, then use it.

Live: Bars, where marks is usedOpen full size

Also on this pagetop_bartoolbaricon_badgefabsearch_barnavigation_bartoggle_groupchip_groupbutton_groupavatar_group

The marks of a list of flags as the bits the groups take (bit i is flags[i]; at most 32).

The groups below take the state of all their parts as one number: bit i is part i.

Signature

pub fn marks(flags: &[bool]) -> u32

Example

use fusuma::marks;
assert_eq!(marks(&[true, false, true]), 0b101);
assert_eq!(marks(&[]), 0);

All components · Source