Skip to main content

ROW_PART_CLASSES

Constant ROW_PART_CLASSES 

Source
pub const ROW_PART_CLASSES: &[&str];
Expand description

The class for a row part.

This comment used to say RowPart was the one closed enum left here, and that gaining a member would stop this compiling — “the same lockstep break non_exhaustive was added elsewhere to end”. makeover-layout 0.9.0 ended it: the enum gained RowPart::Tokens and #[non_exhaustive] in the same release, so the prediction was paid off rather than waited for.

The fallback is what that costs. A member added upstream lands here as a bare row-part with no rule of its own, which is a thing rendering plainly rather than a build that stops. Grep this function when adopting a new makeover-layout.

Public since 0.27.0. A row’s parts are emitted by whoever builds the row element, and that is not always this crate: cells_html emits a table’s cells, but a list row carries the app’s identity and hooks, so a screen renderer writes it. quasi-webview wrote this list out a second time to do that, which made the obligation in the paragraph above land on a function its author would not think to grep. Every class part_class can return, including the fallback.

Beside the match rather than derived from it, because a match over a #[non_exhaustive] enum cannot be enumerated from outside. It carries the same obligation the match does and a test below holds the two together, so a new arm added without a new entry fails rather than silently narrowing what a checker believes this crate can emit.