Struct ego_tree::NodeRef
[−]
[src]
pub struct NodeRef<'a, T: 'a> { /* fields omitted */ }
A node reference.
Methods
impl<'a, T: 'a> NodeRef<'a, T>
[src]
fn value(&self) -> &'a T
Returns the value of this node.
fn id(&self) -> NodeId<T>
Returns the ID of this node.
fn parent(&self) -> Option<NodeRef<'a, T>>
Returns a reference to this node's parent.
fn prev_sibling(&self) -> Option<NodeRef<'a, T>>
Returns a reference to this node's previous sibling.
fn next_sibling(&self) -> Option<NodeRef<'a, T>>
Returns a reference to this node's next sibling.
fn first_child(&self) -> Option<NodeRef<'a, T>>
Returns a reference to this node's first child.
fn last_child(&self) -> Option<NodeRef<'a, T>>
Returns a reference to this node's last child.
fn has_siblings(&self) -> bool
Returns true if this node has siblings.
fn has_children(&self) -> bool
Returns true if this node has children.
impl<'a, T: 'a> NodeRef<'a, T>
[src]
fn ancestors(&self) -> Ancestors<'a, T>
Returns an iterator over this node's ancestors.
fn prev_siblings(&self) -> PrevSiblings<'a, T>
Returns an iterator over this node's previous siblings.
fn next_siblings(&self) -> NextSiblings<'a, T>
Returns an iterator over this node's next siblings.
fn children(&self) -> Children<'a, T>
Returns an iterator over this node's children.
fn first_children(&self) -> FirstChildren<'a, T>
Returns an iterator over this node's first children.
fn last_children(&self) -> LastChildren<'a, T>
Returns an iterator over this node's last children.
fn traverse(&self) -> Traverse<'a, T>
Returns an iterator which traverses the subtree starting at this node.
Trait Implementations
impl<'a, T: 'a> Copy for NodeRef<'a, T>
[src]
impl<'a, T: 'a> Clone for NodeRef<'a, 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<'a, T: 'a> Eq for NodeRef<'a, T>
[src]
impl<'a, T: 'a> PartialEq for NodeRef<'a, 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 !=
.