pub struct Node {
pub id: NodeId,
pub data: NodeData,
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 arena — intrusive linked list of siblings + parent/child pointers.
Fields§
§id: NodeId§data: NodeData§parent: Option<NodeId>§first_child: Option<NodeId>§last_child: Option<NodeId>§prev_sibling: Option<NodeId>§next_sibling: Option<NodeId>Implementations§
Source§impl Node
impl Node
pub fn new(id: NodeId, data: NodeData) -> Self
pub fn is_element(&self) -> bool
pub fn as_element(&self) -> Option<&ElementData>
pub fn as_element_mut(&mut self) -> Option<&mut ElementData>
pub fn as_text(&self) -> Option<&str>
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 UnsafeUnpin 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