pub struct Node {
pub parent: Option<NodeId>,
pub previous_sibling: Option<NodeId>,
pub next_sibling: Option<NodeId>,
pub first_child: Option<NodeId>,
pub last_child: Option<NodeId>,
}
Expand description
Hierarchical information about a node (stores the indicies of the parent / child nodes).
Fields§
§parent: Option<NodeId>
§previous_sibling: Option<NodeId>
§next_sibling: Option<NodeId>
§first_child: Option<NodeId>
§last_child: Option<NodeId>
Implementations§
Source§impl Node
impl Node
pub const ROOT: Node = ROOT_NODE
pub fn has_parent(&self) -> bool
pub fn has_previous_sibling(&self) -> bool
pub fn has_next_sibling(&self) -> bool
pub fn has_first_child(&self) -> bool
pub fn has_last_child(&self) -> bool
Trait Implementations§
Source§impl Ord for Node
impl Ord for Node
Source§impl PartialOrd for Node
impl PartialOrd for Node
impl Copy for Node
impl Eq for Node
impl StructuralPartialEq for Node
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)