pub struct Row {
pub runs: Vec<Run>,
pub decoration: bool,
pub code: bool,
pub code_lang: Option<String>,
pub directive: bool,
pub directive_label: Option<String>,
pub heading: Option<u8>,
pub align: Option<String>,
pub line_height: Option<String>,
pub boundary: Option<Boundary>,
}Expand description
One visual line: its styled runs plus the row-level flags a frontend draws chrome from.
Fields§
§runs: Vec<Run>§decoration: boolDrawn but holds no caret (a table rule, a block-gap blank line): the
renderer skips it for click/caret math. See leaf_core::VRow.
code: boolA fenced/indented code-block line — the renderer draws a tinted, bordered panel around each maximal run of these.
code_lang: Option<String>A fenced block’s language, carried on the block’s first code row only.
directive: boolA :::name{.class} directive-container line — the renderer draws a
tinted panel around each maximal run of these, the code recipe. See
leaf_core::VRow::directive.
directive_label: Option<String>A directive container’s space-joined .class attrs, carried on the
block’s first row only. See leaf_core::VRow::directive_label.
heading: Option<u8>The heading level (1–6) if this row belongs to a heading block, else
None. A proportional renderer sizes the whole row from this so an
inline `code` run inside a heading still reads at the heading’s size.
align: Option<String>How this row’s block is aligned across the measure — "center",
"right", "justify" — and None for the theme’s default, which is
left. On every row the block emits.
A row fact and not a run one for heading’s reason,
and more sharply: alignment is a property of the line, not of the letters
on it, so an empty paragraph the author has just centred carries it with
no run to hang it on. A renderer sets its paragraph style’s alignment
from it. See leaf_core::VRow::align.
line_height: Option<String>How far apart this row’s block sets its lines, as a multiple of the
theme’s own line height — "1.15", "1.5", "2" — and None for the
theme’s spacing. On every row the block emits.
The ratio is the name read as arithmetic (leaf_core::LineSpacing::ratio),
so a renderer laying rows out in points multiplies its line height by it;
one drawing a row per terminal line ignores it, the way it ignores a
heading’s size. See leaf_core::VRow::line_height.
boundary: Option<Boundary>What this row divides, on the blank rows a block boundary is drawn with
and None everywhere else — so boundary != nil is exactly “this row is
a drawn block boundary”. A frontend spaces a boundary by the pair it
falls between (the margin above a heading is wider than the one between
two paragraphs); the height is the frontend’s, the kind is core’s.
See leaf_core::Boundary.