pub struct XPathResult<'doc> { /* private fields */ }Expand description
A live XPath result, borrowed from its document; freed on drop.
Implementations§
Source§impl<'doc> XPathResult<'doc>
impl<'doc> XPathResult<'doc>
pub fn is_empty(&self) -> bool
Sourcepub fn element(&self, index: usize) -> Option<Element<'doc>>
pub fn element(&self, index: usize) -> Option<Element<'doc>>
The element at index (elements only; other kinds are skipped
by the C API and yield None).
Sourcepub fn kind(&self, index: usize) -> XPathNodeKind
pub fn kind(&self, index: usize) -> XPathNodeKind
The kind of the node at index (mixed nodesets).
Sourcepub fn node_name(&self, index: usize) -> Option<&'doc str>
pub fn node_name(&self, index: usize) -> Option<&'doc str>
The name of the node at index (elements and attributes).
Sourcepub fn node_value(&self, index: usize) -> Option<&'doc str>
pub fn node_value(&self, index: usize) -> Option<&'doc str>
The string value of the node at index (text, comment, CDATA,
attributes).
Trait Implementations§
Source§impl Drop for XPathResult<'_>
impl Drop for XPathResult<'_>
Auto Trait Implementations§
impl<'doc> !Send for XPathResult<'doc>
impl<'doc> !Sync for XPathResult<'doc>
impl<'doc> Forget for XPathResult<'doc>
impl<'doc> Freeze for XPathResult<'doc>
impl<'doc> RefUnwindSafe for XPathResult<'doc>
impl<'doc> Unpin for XPathResult<'doc>
impl<'doc> UnsafeUnpin for XPathResult<'doc>
impl<'doc> UnwindSafe for XPathResult<'doc>
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