pub struct Override {
pub ref_id: String,
pub spans: Option<Vec<TextSpan>>,
pub fill: Option<PropertyValue>,
pub visible: Option<bool>,
pub source_span: Option<Span>,
}Expand description
An instance-local override applied to a single descendant of the referenced
component when an InstanceNode is expanded at compile time.
An override is an override ref="<local-descendant-id>" { … } child of an
instance. ref_id names a descendant by its component-LOCAL id (the id as
declared inside the ComponentDef, before instance-id prefixing).
v0 supported override set (documented; richer overrides are a follow-up):
spans— replaces the target text node’sspanswholesale (the override’sspanchildren become the target’s new spans).fill— replaces the target node’sfillvisual property.visible— replaces the target node’svisibleflag.
Each field is None when the override does not touch that aspect; a None
field leaves the corresponding property on the cloned target untouched.
Fields§
§ref_id: StringThe component-LOCAL id of the descendant this override targets.
spans: Option<Vec<TextSpan>>Replacement text spans (only meaningful for a text target).
fill: Option<PropertyValue>Replacement fill (color token ref or literal — validated like any fill).
visible: Option<bool>Replacement visibility flag.
source_span: Option<Span>Source declaration span, when available.