pub struct XPath { /* private fields */ }Implementations§
Source§impl XPath
impl XPath
pub fn new(doc: &Document, _mappings: HashMap<String, String>) -> Self
Sourcepub fn walk(
&mut self,
doc: &Document,
xpath: &str,
node: Option<&Node>,
) -> Option<Vec<Node>>
pub fn walk( &mut self, doc: &Document, xpath: &str, node: Option<&Node>, ) -> Option<Vec<Node>>
xpath at node answered by a read-only walk (WalkQuery): None when it is outside the walk’s grammar
or doc cannot let the walk vouch for XPath’s answer, and the caller evaluates it as XPath.
Sourcepub fn walk_first(
&mut self,
doc: &Document,
xpath: &str,
node: Option<&Node>,
) -> Option<Option<Node>>
pub fn walk_first( &mut self, doc: &Document, xpath: &str, node: Option<&Node>, ) -> Option<Option<Node>>
The first node of walk’s answer (Some(None): none), the walk stopping there.
pub fn register_namespace( &mut self, codeprefix: &str, namespace: &str, ) -> Result<()>
pub fn findnodes(&mut self, xpath: &str, node: Option<&Node>) -> Vec<Node>
pub fn findvalues(&mut self, xpath: &str, node: Option<&Node>) -> Vec<String>
pub fn findvalue(&mut self, xpath: &str, node: Option<&Node>) -> String
Auto Trait Implementations§
impl !RefUnwindSafe for XPath
impl !Send for XPath
impl !Sync for XPath
impl !UnwindSafe for XPath
impl Freeze for XPath
impl Unpin for XPath
impl UnsafeUnpin for XPath
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