Struct ego_tree::NodeRef
[−]
[src]
pub struct NodeRef<'a, T: 'a> { /* fields omitted */ }
Node reference.
Methods
impl<'a, T: 'a> NodeRef<'a, T>
[src]
ⓘImportant traits for Ancestors<'a, T>pub fn ancestors(&self) -> Ancestors<'a, T>
[src]
Returns an iterator over ancestors.
ⓘImportant traits for PrevSiblings<'a, T>pub fn prev_siblings(&self) -> PrevSiblings<'a, T>
[src]
Returns an iterator over previous siblings.
ⓘImportant traits for NextSiblings<'a, T>pub fn next_siblings(&self) -> NextSiblings<'a, T>
[src]
Returns an iterator over next siblings.
ⓘImportant traits for FirstChildren<'a, T>pub fn first_children(&self) -> FirstChildren<'a, T>
[src]
Returns an iterator over first children.
ⓘImportant traits for LastChildren<'a, T>pub fn last_children(&self) -> LastChildren<'a, T>
[src]
Returns an iterator over last children.
ⓘImportant traits for Children<'a, T>pub fn children(&self) -> Children<'a, T>
[src]
Returns an iterator over children.
ⓘImportant traits for Traverse<'a, T>pub fn traverse(&self) -> Traverse<'a, T>
[src]
Returns an iterator which traverses the subtree starting at this node.
ⓘImportant traits for Descendants<'a, T>pub fn descendants(&self) -> Descendants<'a, T>
[src]
Returns an iterator over this node and its descendants.
impl<'a, T: 'a> NodeRef<'a, T>
[src]
pub fn value(&self) -> &'a T
[src]
Returns the value of this node.
pub fn tree(&self) -> &'a Tree<T>
[src]
Returns the tree containing this node.
pub fn id(&self) -> NodeId<T>
[src]
Returns the ID of this node.
pub fn parent(&self) -> Option<Self>
[src]
Returns the parent of this node.
pub fn prev_sibling(&self) -> Option<Self>
[src]
Returns the previous sibling of this node.
pub fn next_sibling(&self) -> Option<Self>
[src]
Returns the next sibling of this node.
pub fn first_child(&self) -> Option<Self>
[src]
Returns the first child of this node.
pub fn last_child(&self) -> Option<Self>
[src]
Returns the last child of this node.
pub fn has_siblings(&self) -> bool
[src]
Returns true if this node has siblings.
pub fn has_children(&self) -> bool
[src]
Returns true if this node has children.
Trait Implementations
impl<'a, T: Debug + 'a> Debug for NodeRef<'a, T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a, T: 'a> Copy for NodeRef<'a, T>
[src]
impl<'a, T: 'a> Clone for NodeRef<'a, T>
[src]
fn clone(&self) -> Self
[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
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
[src]
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[src]
This method tests for !=
.