pub struct NodeRef<'a, T: 'a> { /* private fields */ }
Expand description
Node reference.
Implementations
sourceimpl<'a, T: 'a> NodeRef<'a, T>
impl<'a, T: 'a> NodeRef<'a, T>
sourcepub fn ancestors(&self) -> Ancestors<'a, T>ⓘNotable traits for Ancestors<'a, T>impl<'a, T: 'a> Iterator for Ancestors<'a, T> type Item = NodeRef<'a, T>;
pub fn ancestors(&self) -> Ancestors<'a, T>ⓘNotable traits for Ancestors<'a, T>impl<'a, T: 'a> Iterator for Ancestors<'a, T> type Item = NodeRef<'a, T>;
Returns an iterator over ancestors.
sourcepub fn prev_siblings(&self) -> PrevSiblings<'a, T>ⓘNotable traits for PrevSiblings<'a, T>impl<'a, T: 'a> Iterator for PrevSiblings<'a, T> type Item = NodeRef<'a, T>;
pub fn prev_siblings(&self) -> PrevSiblings<'a, T>ⓘNotable traits for PrevSiblings<'a, T>impl<'a, T: 'a> Iterator for PrevSiblings<'a, T> type Item = NodeRef<'a, T>;
Returns an iterator over previous siblings.
sourcepub fn next_siblings(&self) -> NextSiblings<'a, T>ⓘNotable traits for NextSiblings<'a, T>impl<'a, T: 'a> Iterator for NextSiblings<'a, T> type Item = NodeRef<'a, T>;
pub fn next_siblings(&self) -> NextSiblings<'a, T>ⓘNotable traits for NextSiblings<'a, T>impl<'a, T: 'a> Iterator for NextSiblings<'a, T> type Item = NodeRef<'a, T>;
Returns an iterator over next siblings.
sourcepub fn first_children(&self) -> FirstChildren<'a, T>ⓘNotable traits for FirstChildren<'a, T>impl<'a, T: 'a> Iterator for FirstChildren<'a, T> type Item = NodeRef<'a, T>;
pub fn first_children(&self) -> FirstChildren<'a, T>ⓘNotable traits for FirstChildren<'a, T>impl<'a, T: 'a> Iterator for FirstChildren<'a, T> type Item = NodeRef<'a, T>;
Returns an iterator over first children.
sourcepub fn last_children(&self) -> LastChildren<'a, T>ⓘNotable traits for LastChildren<'a, T>impl<'a, T: 'a> Iterator for LastChildren<'a, T> type Item = NodeRef<'a, T>;
pub fn last_children(&self) -> LastChildren<'a, T>ⓘNotable traits for LastChildren<'a, T>impl<'a, T: 'a> Iterator for LastChildren<'a, T> type Item = NodeRef<'a, T>;
Returns an iterator over last children.
sourcepub fn children(&self) -> Children<'a, T>ⓘNotable traits for Children<'a, T>impl<'a, T: 'a> Iterator for Children<'a, T> type Item = NodeRef<'a, T>;
pub fn children(&self) -> Children<'a, T>ⓘNotable traits for Children<'a, T>impl<'a, T: 'a> Iterator for Children<'a, T> type Item = NodeRef<'a, T>;
Returns an iterator over children.
sourcepub fn traverse(&self) -> Traverse<'a, T>ⓘNotable traits for Traverse<'a, T>impl<'a, T: 'a> Iterator for Traverse<'a, T> type Item = Edge<'a, T>;
pub fn traverse(&self) -> Traverse<'a, T>ⓘNotable traits for Traverse<'a, T>impl<'a, T: 'a> Iterator for Traverse<'a, T> type Item = Edge<'a, T>;
Returns an iterator which traverses the subtree starting at this node.
sourcepub fn descendants(&self) -> Descendants<'a, T>ⓘNotable traits for Descendants<'a, T>impl<'a, T: 'a> Iterator for Descendants<'a, T> type Item = NodeRef<'a, T>;
pub fn descendants(&self) -> Descendants<'a, T>ⓘNotable traits for Descendants<'a, T>impl<'a, T: 'a> Iterator for Descendants<'a, T> type Item = NodeRef<'a, T>;
Returns an iterator over this node and its descendants.
sourceimpl<'a, T: 'a> NodeRef<'a, T>
impl<'a, T: 'a> NodeRef<'a, T>
sourcepub fn prev_sibling(&self) -> Option<Self>
pub fn prev_sibling(&self) -> Option<Self>
Returns the previous sibling of this node.
sourcepub fn next_sibling(&self) -> Option<Self>
pub fn next_sibling(&self) -> Option<Self>
Returns the next sibling of this node.
sourcepub fn first_child(&self) -> Option<Self>
pub fn first_child(&self) -> Option<Self>
Returns the first child of this node.
sourcepub fn last_child(&self) -> Option<Self>
pub fn last_child(&self) -> Option<Self>
Returns the last child of this node.
sourcepub fn has_siblings(&self) -> bool
pub fn has_siblings(&self) -> bool
Returns true if this node has siblings.
sourcepub fn has_children(&self) -> bool
pub fn has_children(&self) -> bool
Returns true if this node has children.
Trait Implementations
sourceimpl<'a, T: 'a> PartialEq<NodeRef<'a, T>> for NodeRef<'a, T>
impl<'a, T: 'a> PartialEq<NodeRef<'a, T>> for NodeRef<'a, T>
impl<'a, T: 'a> Copy for NodeRef<'a, T>
impl<'a, T: 'a> Eq for NodeRef<'a, T>
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for NodeRef<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for NodeRef<'a, T>where
T: Sync,
impl<'a, T> Sync for NodeRef<'a, T>where
T: Sync,
impl<'a, T> Unpin for NodeRef<'a, T>
impl<'a, T> UnwindSafe for NodeRef<'a, T>where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more