enum LabelTargetKind {
Section {
number: String,
},
Figure {
number: String,
supplement: String,
},
Generic,
}Expand description
What a label points at, captured at index-build time.
Each variant carries only the data needed to render the reference’s
display text: references never re-traverse the document via the
target [mos_core::NodeId] once the index is built, so the resolver can stay
kind-aware without exposing a node-typed handle to callers.
Variants§
Section
Heading target with its resolved hierarchical number (e.g.
"1.2").
Figure
Captioned figure with its resolved flat document-order number
(e.g. "3") and supplement word ("Figure" by default, or a
custom #figure(supplement: …)). References render kind-aware as
"{supplement} {number}" (e.g. "Figure 3", "Plate 3"). A
skipped (numbered: false) figure carries an empty number and
renders as its bare label instead.
Generic
Anything else carrying a label (paragraph, raw block, image, …).
Trait Implementations§
Source§impl Clone for LabelTargetKind
impl Clone for LabelTargetKind
Source§fn clone(&self) -> LabelTargetKind
fn clone(&self) -> LabelTargetKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more