pub struct MasterDef {
pub id: String,
pub children: Vec<Node>,
pub source_span: Option<Span>,
}Expand description
A reusable master-page definition: a named child-node subtree declared once
(in the document-level masters block) and projected onto every Page
whose master attribute names it.
Declared as master id="m.body" { <any child nodes, incl. field nodes> }.
Structurally mirrors ComponentDef: the master’s child node ids are LOCAL
to the master (validated for uniqueness only WITHIN the master) and are
prefixed with the page id when the master is projected at compile time. The
master id itself participates in the global id-uniqueness set.
Unlike a component, a master is not instanced explicitly: a page opts in via
page ... master="m.body", and the master’s Field
nodes are resolved against that page’s index/parity/live-area at compile time.
Fields§
§id: String§children: Vec<Node>The master’s child nodes in source order (the projected subtree).
source_span: Option<Span>Source declaration span, when available.