pub struct NodeRef<'a, T: 'a> { /* private fields */ }
Expand description
Node reference.
Implementations§
Source§impl<'a, T: 'a> NodeRef<'a, T>
impl<'a, T: 'a> NodeRef<'a, T>
Sourcepub fn prev_siblings(&self) -> PrevSiblings<'a, T> ⓘ
pub fn prev_siblings(&self) -> PrevSiblings<'a, T> ⓘ
Returns an iterator over previous siblings.
Sourcepub fn next_siblings(&self) -> NextSiblings<'a, T> ⓘ
pub fn next_siblings(&self) -> NextSiblings<'a, T> ⓘ
Returns an iterator over next siblings.
Sourcepub fn first_children(&self) -> FirstChildren<'a, T> ⓘ
pub fn first_children(&self) -> FirstChildren<'a, T> ⓘ
Returns an iterator over first children.
Sourcepub fn last_children(&self) -> LastChildren<'a, T> ⓘ
pub fn last_children(&self) -> LastChildren<'a, T> ⓘ
Returns an iterator over last children.
Sourcepub fn traverse(&self) -> Traverse<'a, T> ⓘ
pub fn traverse(&self) -> Traverse<'a, T> ⓘ
Returns an iterator which traverses the subtree starting at this node.
Sourcepub fn descendants(&self) -> Descendants<'a, T> ⓘ
pub fn descendants(&self) -> Descendants<'a, T> ⓘ
Returns an iterator over this node and its descendants.
Source§impl<'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§
impl<'a, T: 'a> Copy for NodeRef<'a, T>
impl<'a, T: 'a> Eq for NodeRef<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for NodeRef<'a, T>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more