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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)