Struct pax_compiler::manifest::TemplateNodeDefinition
source · pub struct TemplateNodeDefinition {
pub id: usize,
pub child_ids: Vec<usize>,
pub type_id: String,
pub control_flow_settings: Option<ControlFlowSettingsDefinition>,
pub settings: Option<Vec<(String, ValueDefinition)>>,
pub pascal_identifier: String,
}
Expand description
Represents an entry within a component template, e.g. a TemplateNodeDefinition
, and this is a compile-time
concern. Note the difference between compile-time definitions
and runtime instances
.
A compile-time TemplateNodeDefinition
corresponds to a single runtime RenderNode
instance.
Fields§
§id: usize
Component-unique int ID. Conventionally, id 0 will be the root node for a component’s template
child_ids: Vec<usize>
Vec of int IDs representing the child TemplateNodeDefinitions of this TemplateNodeDefinition
type_id: String
Reference to the unique string ID for a component, e.g. primitive::Frame
or component::Stacker
control_flow_settings: Option<ControlFlowSettingsDefinition>
Iff this TND is a control-flow node: parsed control flow attributes (slot/if/for)
settings: Option<Vec<(String, ValueDefinition)>>
IFF this TND is NOT a control-flow node: parsed key-value store of attribute definitions (like some_key="some_value"
)
pascal_identifier: String
e.g. the SomeName
in <SomeName some_key="some_value" />
Trait Implementations§
source§impl Clone for TemplateNodeDefinition
impl Clone for TemplateNodeDefinition
source§fn clone(&self) -> TemplateNodeDefinition
fn clone(&self) -> TemplateNodeDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more