pub struct Node {
pub kind: NodeKind,
pub parent: Option<NodeId>,
pub first_child: Option<NodeId>,
pub last_child: Option<NodeId>,
pub prev_sibling: Option<NodeId>,
pub next_sibling: Option<NodeId>,
}Expand description
A node in the DOM tree.
Nodes are linked via first_child/last_child for parent-child relationships
and prev_sibling/next_sibling for sibling relationships. This linked structure
eliminates per-node Vec allocations and enables O(1) append operations.
Fields§
§kind: NodeKindThe kind of node (element, text, or comment).
parent: Option<NodeId>Parent node, if any.
first_child: Option<NodeId>First child node.
last_child: Option<NodeId>Last child node.
prev_sibling: Option<NodeId>Previous sibling.
next_sibling: Option<NodeId>Next sibling.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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