#[non_exhaustive]pub enum RowPart {
Primary,
Secondary,
Meta,
Actions,
Tokens,
Proportion,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Primary
The thing itself. What the row is called.
Secondary
Supporting text under the primary.
Meta
A short trailing fact: a count, a size, a date.
Actions
Controls that act on this row.
Tokens
Small labelled things belonging to the row: badges, chips, tags.
Each carries its own Token kind and Tone, so a renderer with no
colour still has the kind to work with, and one with no chips still has
the label. That is the constrained-consumer test this vocabulary exists
to pass, and it is why the tone lives on the token rather than on the
part.
Proportion
How much of a set the row’s thing has done: a Meter in the row.
Added 0.11.0, da5666ae, and it is Tokens’s problem
again with a different payload. Meter arrived at 0.10.0 and closed
two of the seven sites that asked for it; the other five sit in rows, and
a row holds no nodes by the ruling that a row part may not carry an
arbitrary node — the door through which a description becomes a
templating language. So the part carries the description of a bar
rather than a node, exactly as Tokens carries tags rather than nodes.
Without it a row flattens the proportion into Meta as
“3/7 subtasks”, which keeps both numbers and loses the reading, the same
way a toned status badge read as prose before Tokens.
Implementations§
Source§impl RowPart
impl RowPart
Sourcepub const fn priority(self) -> Priority
pub const fn priority(self) -> Priority
What the part is worth when the run does not fit.
The default only. A part may say otherwise, and a renderer reads the
part rather than the role; this is what a description that has never
heard of Priority means, which is every description written before
the field existed.
Deriving it from the role is the thing this vocabulary has otherwise
been moving away from, and it is right here for one reason: the roles
already encode this ranking and every consumer already assumes it.
Primary is what the row is called, and
Priority::Essential’s own doc was written about exactly that –
“without it the row does not identify itself”.
Actions is Essential and it is the interesting one.
A control is not a fact, so dropping it does not cost the reader a
detail; it costs them the only way to act on the row, and in a terminal
it silently removes something focus had already been claimed for. A
renderer that needs room takes it from what the row says, never from
what it offers.
An unknown member reads as Priority::Secondary: droppable, but not
first, since guessing Optional for something this crate has not been
taught would make a new member the first thing to vanish.