Struct rinutil::idtree::NodeId [−][src]
pub struct NodeId { /* fields omitted */ }
A node identifier within a particular Arena
.
Methods
impl NodeId
[src]
impl NodeId
ⓘImportant traits for Ancestors<'a, T>pub fn ancestors<T>(self, arena: &Arena<T>) -> Ancestors<T>
[src]
pub 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.
ⓘImportant traits for PrecedingSiblings<'a, T>pub fn preceding_siblings<T>(self, arena: &Arena<T>) -> PrecedingSiblings<T>
[src]
pub 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.
ⓘImportant traits for FollowingSiblings<'a, T>pub fn following_siblings<T>(self, arena: &Arena<T>) -> FollowingSiblings<T>
[src]
pub 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.
ⓘImportant traits for Children<'a, T>pub fn children<T>(self, arena: &Arena<T>) -> Children<T>
[src]
pub fn children<T>(self, arena: &Arena<T>) -> Children<T>
Return an iterator of references to this node’s children.
ⓘImportant traits for ReverseChildren<'a, T>pub fn reverse_children<T>(self, arena: &Arena<T>) -> ReverseChildren<T>
[src]
pub fn reverse_children<T>(self, arena: &Arena<T>) -> ReverseChildren<T>
Return an iterator of references to this node’s children, in reverse order.
ⓘImportant traits for Descendants<'a, T>pub fn descendants<T>(self, arena: &Arena<T>) -> Descendants<T>
[src]
pub 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.
ⓘImportant traits for Traverse<'a, T>pub fn traverse<T>(self, arena: &Arena<T>) -> Traverse<T>
[src]
pub fn traverse<T>(self, arena: &Arena<T>) -> Traverse<T>
Return an iterator of references to this node and its descendants, in tree order.
ⓘImportant traits for ReverseTraverse<'a, T>pub fn reverse_traverse<T>(self, arena: &Arena<T>) -> ReverseTraverse<T>
[src]
pub fn reverse_traverse<T>(self, arena: &Arena<T>) -> ReverseTraverse<T>
Return an iterator of references to this node and its descendants, in tree order.
pub fn detach<T>(self, arena: &mut Arena<T>) -> NodeIdMut<T>
[src]
pub fn detach<T>(self, arena: &mut Arena<T>) -> NodeIdMut<T>
Detach a node from its parent and siblings. Children are not affected.
pub fn append<T>(self, new_child: NodeId, arena: &mut Arena<T>) -> NodeIdMut<T>
[src]
pub fn append<T>(self, new_child: NodeId, arena: &mut Arena<T>) -> NodeIdMut<T>
Append a new child to this node, after existing children.
pub fn append_new<T>(self, new_data: T, arena: &mut Arena<T>) -> NodeIdMut<T>
[src]
pub fn append_new<T>(self, new_data: T, arena: &mut Arena<T>) -> NodeIdMut<T>
pub fn prepend<T>(self, new_child: NodeId, arena: &mut Arena<T>) -> NodeIdMut<T>
[src]
pub fn prepend<T>(self, new_child: NodeId, arena: &mut Arena<T>) -> NodeIdMut<T>
Prepend a new child to this node, before existing children.
pub fn prepend_new<T>(self, new_data: T, arena: &mut Arena<T>) -> NodeIdMut<T>
[src]
pub fn prepend_new<T>(self, new_data: T, arena: &mut Arena<T>) -> NodeIdMut<T>
pub fn insert_after<T>(
self,
new_sibling: NodeId,
arena: &mut Arena<T>
) -> NodeIdMut<T>
[src]
pub fn insert_after<T>(
self,
new_sibling: NodeId,
arena: &mut Arena<T>
) -> NodeIdMut<T>
Insert a new sibling after this node.
pub fn insert_after_new<T>(
self,
new_data: T,
arena: &mut Arena<T>
) -> NodeIdMut<T>
[src]
pub fn insert_after_new<T>(
self,
new_data: T,
arena: &mut Arena<T>
) -> NodeIdMut<T>
pub fn insert_before<T>(
self,
new_sibling: NodeId,
arena: &mut Arena<T>
) -> NodeIdMut<T>
[src]
pub fn insert_before<T>(
self,
new_sibling: NodeId,
arena: &mut Arena<T>
) -> NodeIdMut<T>
Insert a new sibling before this node.
pub fn insert_before_new<T>(
self,
new_data: T,
arena: &mut Arena<T>
) -> NodeIdMut<T>
[src]
pub fn insert_before_new<T>(
self,
new_data: T,
arena: &mut Arena<T>
) -> NodeIdMut<T>
Trait Implementations
impl PartialEq for NodeId
[src]
impl PartialEq for NodeId
fn eq(&self, other: &NodeId) -> bool
[src]
fn eq(&self, other: &NodeId) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &NodeId) -> bool
[src]
fn ne(&self, other: &NodeId) -> bool
This method tests for !=
.
impl Eq for NodeId
[src]
impl Eq for NodeId
impl Copy for NodeId
[src]
impl Copy for NodeId
impl Clone for NodeId
[src]
impl Clone for NodeId
fn clone(&self) -> NodeId
[src]
fn clone(&self) -> NodeId
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for NodeId
[src]
impl Debug for NodeId
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> From<Node<T>> for NodeId
[src]
impl<T> From<Node<T>> for NodeId
impl<'a, T> From<NodeIdMut<'a, T>> for NodeId
[src]
impl<'a, T> From<NodeIdMut<'a, T>> for NodeId
impl<'a, T> From<NodeIdRef<'a, T>> for NodeId
[src]
impl<'a, T> From<NodeIdRef<'a, T>> for NodeId
impl<T> Index<NodeId> for Arena<T>
[src]
impl<T> Index<NodeId> for Arena<T>
type Output = Node<T>
The returned type after indexing.
fn index(&self, node: NodeId) -> &Node<T>
[src]
fn index(&self, node: NodeId) -> &Node<T>
Performs the indexing (container[index]
) operation.
impl<T> IndexMut<NodeId> for Arena<T>
[src]
impl<T> IndexMut<NodeId> for Arena<T>