[][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> Eq for NodeRef<'a, T>[src]

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

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

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

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

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> Unpin for NodeRef<'a, T>

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

impl<'a, T> UnwindSafe for NodeRef<'a, T> where
    T: RefUnwindSafe

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

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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