Struct ego_tree::NodeId
[−]
[src]
pub struct NodeId<T> { /* fields omitted */ }
A node ID.
NodeId
acts as a weak reference which is not tied to the lifetime of the Tree
that created
it.
With the original Tree
, a NodeId
can be used to obtain a NodeRef
or NodeMut
.
Examples
Obtaining an ID
use ego_tree::Tree; let tree = Tree::new('a'); let root_id = tree.root().id();
Obtaining a NodeRef
let root = tree.get(root_id);
Trait Implementations
impl<T> Copy for NodeId<T>
[src]
impl<T> Clone for NodeId<T>
[src]
fn clone(&self) -> Self
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
impl<T> Eq for NodeId<T>
[src]
impl<T> PartialEq for NodeId<T>
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.