#[non_exhaustive]pub enum CellPart {
Value,
Tokens,
Actions,
Link,
}Expand description
What a table cell holds.
RowPart for tables, and it exists for the same reason: a part that
carries a control is not text, and a renderer with one class for the whole
cell paints it as though it were. makeover-webview emitted a single
.cell until 0.25.0, so a button in a cell inherited the cell’s content
colour, which is the exact drift RowPart::intent prevents for rows and
prevented for nothing here.
Four members, and the count is what quasi’s Cell was measured to carry:
a value, tokens (33 cells across 22 server templates), actions (30 rows
carrying a control, 5 beside a value) and a link (35 cells across 18
templates). Nothing was added past what something holds.
#[non_exhaustive] for RowPart’s reason: growth here must not be a
lockstep event across three renderers.
§No hover-reveal
RowPart carried a revealed_on_hover until 0.13.0 retired it, and this
enum never gets one. A cell’s actions are shown at rest in every consumer
measured, and a member nothing uses is one three renderers owe an answer
for.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Value
The cell’s own text.
Tokens
Small labelled things in the cell: a status badge, a chip.
Actions
Controls that act on what the row is about.
Link
The cell’s value, where the value is itself a link.
Implementations§
Source§impl CellPart
impl CellPart
Sourcepub const fn intent(self) -> &'static str
pub const fn intent(self) -> &'static str
The content intent the part takes.
One part is text and three are not, so three answer with the intent
inheriting already gives. That is RowPart::intent’s shape with the
text side narrower: a cell’s secondary and muted readings are the
column’s business, not the cell’s.