[][src]Struct ego_tree::NodeRef

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 id(&self) -> NodeId
[src]

Returns the ID of this node.

pub fn tree(&self) -> &'a Tree<T>
[src]

Returns the tree owning this node.

pub fn value(&self) -> &'a T
[src]

Returns the value 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: 'a> From<NodeMut<'a, T>> for NodeRef<'a, T>
[src]

impl<'a, T: 'a> Eq for NodeRef<'a, T>
[src]

impl<'a, T: 'a> Copy for NodeRef<'a, T>
[src]

impl<'a, T: 'a> PartialEq<NodeRef<'a, T>> for NodeRef<'a, T>
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'a, T: 'a> Clone for NodeRef<'a, T>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a, T: Debug + 'a> Debug for NodeRef<'a, T>
[src]

Auto Trait Implementations

impl<'a, T> Send for NodeRef<'a, T> where
    T: Sync

impl<'a, T> Sync for NodeRef<'a, T> where
    T: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]