Struct indextree::NodeId
[−]
[src]
pub struct NodeId { /* fields omitted */ }
A node identifier within a particular Arena
Methods
impl NodeId
[src]
fn ancestors<T>(self, arena: &Arena<T>) -> Ancestors<T>
Return an iterator of references to this node and its ancestors.
Call .next().unwrap()
once on the iterator to skip the node itself.
fn preceding_siblings<T>(self, arena: &Arena<T>) -> PrecedingSiblings<T>
Return an iterator of references to this node and the siblings before it.
Call .next().unwrap()
once on the iterator to skip the node itself.
fn following_siblings<T>(self, arena: &Arena<T>) -> FollowingSiblings<T>
Return an iterator of references to this node and the siblings after it.
Call .next().unwrap()
once on the iterator to skip the node itself.
fn children<T>(self, arena: &Arena<T>) -> Children<T>
Return an iterator of references to this node’s children.
fn reverse_children<T>(self, arena: &Arena<T>) -> ReverseChildren<T>
Return an iterator of references to this node’s children, in reverse order.
fn descendants<T>(self, arena: &Arena<T>) -> Descendants<T>
Return an iterator of references to this node and its descendants, in tree order.
Parent nodes appear before the descendants.
Call .next().unwrap()
once on the iterator to skip the node itself.
fn traverse<T>(self, arena: &Arena<T>) -> Traverse<T>
Return an iterator of references to this node and its descendants, in tree order.
fn reverse_traverse<T>(self, arena: &Arena<T>) -> ReverseTraverse<T>
Return an iterator of references to this node and its descendants, in tree order.
fn detach<T>(self, arena: &mut Arena<T>)
Detach a node from its parent and siblings. Children are not affected.
fn append<T>(self, new_child: NodeId, arena: &mut Arena<T>)
Append a new child to this node, after existing children.
fn prepend<T>(self, new_child: NodeId, arena: &mut Arena<T>)
Prepend a new child to this node, before existing children.
fn insert_after<T>(self, new_sibling: NodeId, arena: &mut Arena<T>)
Insert a new sibling after this node.
fn insert_before<T>(self, new_sibling: NodeId, arena: &mut Arena<T>)
Insert a new sibling before this node.
Trait Implementations
impl PartialEq for NodeId
[src]
fn eq(&self, __arg_0: &NodeId) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &NodeId) -> bool
This method tests for !=
.
impl Eq for NodeId
[src]
impl Copy for NodeId
[src]
impl Clone for NodeId
[src]
fn clone(&self) -> NodeId
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more