pub struct NodeMeta<Msg> {
pub class: Option<String>,
pub on_click: Option<Msg>,
pub on_input: Option<OnInput<Msg>>,
pub on_toggle: Option<OnToggle<Msg>>,
pub ai: AiMeta,
pub data_appfront_id: Option<u64>,
pub is_dynamic: bool,
pub attrs: Vec<(String, String)>,
pub key: Option<String>,
pub virtual_scroll: Option<VirtualScroll>,
}Fields§
§class: Option<String>§on_click: Option<Msg>§on_input: Option<OnInput<Msg>>See OnInput. Not serializable — a live closure can’t survive
SSR/hydration JSON, and SSR/AI-schema rendering never needs to call
it, only know an input exists. Currently only tpt-appfront-dom wires
this into a real oninput listener; tpt-appfront-canvas/tpt-appfront-tui
don’t consume it yet.
on_toggle: Option<OnToggle<Msg>>See OnToggle. Two-way binding for Checkbox nodes; not
serializable, same reasoning as on_input.
ai: AiMeta§data_appfront_id: Option<u64>Stable identifier assigned before SSR so the client hydrator can match
server-rendered DOM nodes back to their UITree counterpart.
is_dynamic: boolWhether the subtree this node roots was produced by a
#[tpt_appfront_core::component] function whose body reads any
Signal. false (the default) means either the node wasn’t
produced by the macro, or the macro’s static analysis found no
signal reads in the function body. Backends can use this as a hint
to skip hydration/listener work for subtrees that never change
(see Phase 9 islands hydration).
attrs: Vec<(String, String)>Arbitrary key/value attributes rendered verbatim by backends. Used for
accessibility (role, aria-*, tabindex), semantic landmarks
(aria-label, role="navigation"), and any backend-specific attribute
that has no first-class NodeMeta field. Serialized as-is, so values
must be String (no closures). Backends render these as DOM attributes
(HTML/SSR), and ignore the ones they don’t model (canvas/TUI).
key: Option<String>Stable identity for reconciliation, e.g. a row/entity id. Set via
NodeRef::key on items inside a NodeKind::List/NodeKind::DataGrid
so backends can diff add/remove/reorder against a previous render
instead of rebuilding every child from scratch.
virtual_scroll: Option<VirtualScroll>Windowed-rendering config for List/DataGrid nodes — see
VirtualScroll. None (the default) means render every item.
Trait Implementations§
Source§impl<Msg: Debug> Debug for NodeMeta<Msg>
Manual impl since on_input’s Rc<dyn Fn(String) -> Msg> can’t derive
Debug (trait objects for Fn don’t implement it) — every other field
still prints normally, on_input prints as a presence marker.
impl<Msg: Debug> Debug for NodeMeta<Msg>
Manual impl since on_input’s Rc<dyn Fn(String) -> Msg> can’t derive
Debug (trait objects for Fn don’t implement it) — every other field
still prints normally, on_input prints as a presence marker.