#[non_exhaustive]pub enum NodeData<Ext = ()> {
Element {
tag: String,
attrs: BTreeMap<String, String>,
classes: BTreeSet<String>,
ext: Ext,
},
Text {
data: String,
},
Comment {
data: String,
},
Fragment,
}Expand description
Per-type payload.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Element
Fields
§
attrs: BTreeMap<String, String>BTreeMap for deterministic iteration (markup round-trips, snapshot test stability).
§
ext: ExtPresentation extension (() in core, TuiExt in rdom-tui).
Text
Comment
Fragment
DocumentFragment — a detachable subtree container. Inserting a fragment unwraps it: children move to the target, fragment itself stays empty and reusable.
Trait Implementations§
Auto Trait Implementations§
impl<Ext> Freeze for NodeData<Ext>where
Ext: Freeze,
impl<Ext> RefUnwindSafe for NodeData<Ext>where
Ext: RefUnwindSafe,
impl<Ext> Send for NodeData<Ext>where
Ext: Send,
impl<Ext> Sync for NodeData<Ext>where
Ext: Sync,
impl<Ext> Unpin for NodeData<Ext>where
Ext: Unpin,
impl<Ext> UnsafeUnpin for NodeData<Ext>where
Ext: UnsafeUnpin,
impl<Ext> UnwindSafe for NodeData<Ext>where
Ext: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more