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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Eq for NodeId<T>
[src]

impl<T> PartialEq for NodeId<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Debug> Debug for NodeId<T>
[src]

Formats the value using the given formatter.