pub struct Panel {
pub groups: &'static [Group],
pub exhaustive: bool,
}Expand description
One body’s controls, grouped the way its instrument groups them.
⚠️ Not the Electro 5’s CenterPanel and friends, which are bodies — nested
#[bitbody]s at a byte range. This is the panel as a reader sees it, and it cuts
across those bodies freely.
Fields§
§groups: &'static [Group]The sections, in the order a reader meets them.
exhaustive: boolWhether the groups account for every field the body registers.
True is checked by this module’s tests, so an exhaustive layout stays exhaustive
as the body grows: a newly declared field fails the test until it is placed. False
means Self::leftovers can be non-empty and a caller needs somewhere to put it.
Implementations§
Source§impl Panel
impl Panel
Source§impl Panel
impl Panel
Sourcepub fn resolve<'a>(&'a self, fields: &'a [Field]) -> Resolved<'a>
pub fn resolve<'a>(&'a self, fields: &'a [Field]) -> Resolved<'a>
The layout against one body’s field values: every group with its own fields and its effective relevance, plus whatever no group named.
One pass builds an index of the body’s paths, so drawing a layout costs about one walk of the field list however many members the groups name — which matters at the Stage bodies’ scale.