#[repr(C)]pub struct NodeDataExt {
pub attributes: AttributeTypeVec,
pub virtual_view: Option<VirtualViewNode>,
pub dataset: Option<RefAny>,
pub svg_data: Option<SvgNodeData>,
pub menu_bar: Option<Box<Menu>>,
pub context_menu: Option<Box<Menu>>,
pub key: Option<u64>,
pub marker: Option<AzString>,
pub dataset_merge_callback: Option<DatasetMergeCallback>,
pub component_origin: Option<ComponentOrigin>,
pub animation_callbacks: Vec<AnimationFunction>,
}Expand description
NOTE: NOT EXPOSED IN THE API! Stores extra,
not commonly used information for the NodeData.
This helps keep the primary NodeData struct smaller for common cases.
Fields§
§attributes: AttributeTypeVecStrongly-typed HTML attributes (aria-*, href, alt, etc.)
IDs and classes are stored as AttributeType::Id and AttributeType::Class entries.
Moved from NodeData to save 48B for the ~95% of nodes with no attributes.
virtual_view: Option<VirtualViewNode>VirtualView callback data, only set when node_type == NodeType::VirtualView.
dataset: Option<RefAny>data-* attributes for this node, useful to store UI-related data on the node itself.
svg_data: Option<SvgNodeData>SVG-specific data or raster clip mask for this DOM node.
Menu bar that should be displayed at the top of this nodes rect.
Context menu that should be opened when the item is left-clicked.
key: Option<u64>Stable key for reconciliation. If provided, allows the framework to track this node across frames even if its position in the array changes. This is crucial for correct lifecycle events when lists are reordered.
marker: Option<AzString>App-chosen MARKER string, resolvable to this node’s (DomId, NodeId)
via CallbackInfo::get_node_id_by_marker. The clean spelling of the
“find that other widget from this callback” jump: the app mints a
unique string at build time (a UUID, a counter — anything unique in
the window), stamps it on the node AND keeps it in whatever dataset
the jumping callback holds. Replaces the old
get_node_id_of_root_dataset search, which needed an EMPTY instance
of the target’s private dataset type just to name it — coupling the
caller to widget internals the architecture forbids it from seeing.
Unlike an Id attribute, a marker is invisible to CSS matching.
dataset_merge_callback: Option<DatasetMergeCallback>Callback to merge dataset state from a previous frame’s node into the current node. This enables heavy resource preservation (video decoders, GL textures) across frames.
component_origin: Option<ComponentOrigin>Tracks which component rendered this DOM subtree. Set by the framework during component rendering — the root node(s) of a component’s output DOM get stamped with the component’s qualified name. Enables the debugger to reconstruct the component invocation tree from the flat rendered DOM, and enables code generation roundtrips.
animation_callbacks: Vec<AnimationFunction>COMPONENT-ATTACHED presence-animation functions, resolvable by NAME
from this node’s -azul-animation-in / -azul-animation-out (after
stylesheet @keyframes — the web mechanism stays the only default
name source). This replaced the global AppConfig registry (USER
ruling 2026-08-17): a sidebar widget ships its fly-out next to its
own DOM, not in app-global state.
Trait Implementations§
Source§impl Clone for NodeDataExt
impl Clone for NodeDataExt
Source§fn clone(&self) -> NodeDataExt
fn clone(&self) -> NodeDataExt
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more