pub struct NodeHandle<'a> { /* private fields */ }
Available on crate feature
tree
only.Expand description
Node handle.
Implementations§
Source§impl<'a> NodeHandle<'a>
impl<'a> NodeHandle<'a>
Sourcepub fn attributes(&self) -> &'a [AttributeValue]
pub fn attributes(&self) -> &'a [AttributeValue]
Returns the node attributes.
Sourcepub fn children_by_name(&self, name: &str) -> ChildrenByName<'a> ⓘ
pub fn children_by_name(&self, name: &str) -> ChildrenByName<'a> ⓘ
Returns an iterator of children with the given name.
Sourcepub fn first_child_by_name(&self, name: &str) -> Option<Self>
pub fn first_child_by_name(&self, name: &str) -> Option<Self>
Returns the first child with the given name.
Source§impl<'a> NodeHandle<'a>
impl<'a> NodeHandle<'a>
Sourcepub fn parent(&self) -> Option<NodeHandle<'a>>
pub fn parent(&self) -> Option<NodeHandle<'a>>
Returns parent node handle if available.
Sourcepub fn first_child(&self) -> Option<NodeHandle<'a>>
pub fn first_child(&self) -> Option<NodeHandle<'a>>
Returns first child node handle if available.
Sourcepub fn last_child(&self) -> Option<NodeHandle<'a>>
pub fn last_child(&self) -> Option<NodeHandle<'a>>
Returns last child node handle if available.
Sourcepub fn previous_sibling(&self) -> Option<NodeHandle<'a>>
pub fn previous_sibling(&self) -> Option<NodeHandle<'a>>
Returns previous sibling node handle if available.
Sourcepub fn next_sibling(&self) -> Option<NodeHandle<'a>>
pub fn next_sibling(&self) -> Option<NodeHandle<'a>>
Returns next sibling node handle if available.
Trait Implementations§
Source§impl<'a> Clone for NodeHandle<'a>
impl<'a> Clone for NodeHandle<'a>
Source§fn clone(&self) -> NodeHandle<'a>
fn clone(&self) -> NodeHandle<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for NodeHandle<'a>
impl<'a> Debug for NodeHandle<'a>
impl<'a> Copy for NodeHandle<'a>
Auto Trait Implementations§
impl<'a> Freeze for NodeHandle<'a>
impl<'a> RefUnwindSafe for NodeHandle<'a>
impl<'a> Send for NodeHandle<'a>
impl<'a> Sync for NodeHandle<'a>
impl<'a> Unpin for NodeHandle<'a>
impl<'a> UnwindSafe for NodeHandle<'a>
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