Struct indextree_ng::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>
[src]
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>
[src]
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>
[src]
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>
[src]
Return an iterator of references to this node’s children.
fn reverse_children<T>(self, arena: &Arena<T>) -> ReverseChildren<T>
[src]
Return an iterator of references to this node’s children, in reverse order.
fn descendants<T>(self, arena: &Arena<T>) -> Descendants<T>
[src]
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>
[src]
Return an iterator of references to this node and its descendants, in tree order.
fn reverse_traverse<T>(self, arena: &Arena<T>) -> ReverseTraverse<T>
[src]
Return an iterator of references to this node and its descendants, in tree order.
fn detach<T>(self, arena: &mut Arena<T>)
[src]
Detach a node from its parent and siblings. Children are not affected.
fn append<T>(
self,
new_child: NodeId,
arena: &mut Arena<T>
) -> Result<(), IndexTreeError>
[src]
self,
new_child: NodeId,
arena: &mut Arena<T>
) -> Result<(), IndexTreeError>
Append a new child to this node, after existing children.
fn prepend<T>(
self,
new_child: NodeId,
arena: &mut Arena<T>
) -> Result<(), IndexTreeError>
[src]
self,
new_child: NodeId,
arena: &mut Arena<T>
) -> Result<(), IndexTreeError>
Prepend a new child to this node, before existing children.
fn insert_after<T>(
self,
new_sibling: NodeId,
arena: &mut Arena<T>
) -> Result<(), IndexTreeError>
[src]
self,
new_sibling: NodeId,
arena: &mut Arena<T>
) -> Result<(), IndexTreeError>
Insert a new sibling after this node.
fn insert_before<T>(
self,
new_sibling: NodeId,
arena: &mut Arena<T>
) -> Result<(), IndexTreeError>
[src]
self,
new_sibling: NodeId,
arena: &mut Arena<T>
) -> Result<(), IndexTreeError>
Insert a new sibling before this node.
Trait Implementations
impl PartialEq for NodeId
[src]
fn eq(&self, __arg_0: &NodeId) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &NodeId) -> bool
[src]
This method tests for !=
.
impl Eq for NodeId
[src]
impl Copy for NodeId
[src]
impl Clone for NodeId
[src]
fn clone(&self) -> NodeId
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more