pub enum Segment {
Text(String),
Path {
value: String,
snapshot: Side,
},
Uint(u64),
Float(f64),
}Expand description
One piece of a Summary.
Each variant carries a value and, implicitly, the render-time policy
for it: group an integer, format a float, leave text alone, dereference
a path. Renderers format by variant; they never parse prose to recover
the type of a value, because the producer never threw it away. Variants
track render behavior, not semantics — a currency or percent is Text
plus a number, never its own variant. See ADR
2026-06-03-structured-summary-segments.
Variants§
Text(String)
Verbatim text: connective wording, units, punctuation, and any
value the renderer must not reinterpret. Embedded digits are never
reformatted — a number that should be grouped is a Segment::Uint,
and a path that could be linked is a Segment::Path.
Path
A path or locator. Renderers may shorten or hyperlink it; snapshot
says which side of the diff it resolves in.
Uint(u64)
A non-negative count. Renderers apply digit grouping / locale.
Float(f64)
A real-valued quantity. Renderers apply decimal / precision policy.