[−][src]Struct sxd_xpath_visitor::context::Evaluation
The context during evaluation of an XPath expression.
Clients of this library will use this when implementing custom functions.
Lifetimes
We track two separate lifetimes: that of the user-provided context
('c
) and that of the document ('d
). This allows the
user-provided context to live shorter than the document.
Fields
node: Node<'d>
The context node
position: usize
The context position
size: usize
The context size
Implementations
impl<'c, 'd> Evaluation<'c, 'd>
[src]
pub fn new(context: &'c Context<'d>, node: Node<'d>) -> Evaluation<'c, 'd>
[src]
Prepares the context used while evaluating the XPath expression
pub fn new_context_for<N>(&self, node: N) -> Evaluation<'c, 'd> where
N: Into<Node<'d>>,
[src]
N: Into<Node<'d>>,
Creates a new context node using the provided node
pub fn function_for_name(&self, name: QName<'_>) -> Option<&'c dyn Function>
[src]
Looks up the function with the given name
pub fn value_of(&self, name: QName<'_>) -> Option<&Value<'d>>
[src]
Looks up the value of the variable
pub fn namespace_for(&self, prefix: &str) -> Option<&str>
[src]
Looks up the namespace URI for the given prefix
pub fn new_contexts_for(
self,
nodes: OrderedNodes<'d>
) -> EvaluationNodesetIter<'c, 'd>ⓘNotable traits for EvaluationNodesetIter<'c, 'd>
impl<'c, 'd> Iterator for EvaluationNodesetIter<'c, 'd> type Item = Evaluation<'c, 'd>;
[src]
self,
nodes: OrderedNodes<'d>
) -> EvaluationNodesetIter<'c, 'd>ⓘ
Notable traits for EvaluationNodesetIter<'c, 'd>
impl<'c, 'd> Iterator for EvaluationNodesetIter<'c, 'd> type Item = Evaluation<'c, 'd>;
Yields a new Evaluation
context for each node in the nodeset.
Trait Implementations
impl<'c, 'd> Clone for Evaluation<'c, 'd>
[src]
pub fn clone(&self) -> Evaluation<'c, 'd>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'c, 'd> Copy for Evaluation<'c, 'd>
[src]
Auto Trait Implementations
impl<'c, 'd> !RefUnwindSafe for Evaluation<'c, 'd>
[src]
impl<'c, 'd> !Send for Evaluation<'c, 'd>
[src]
impl<'c, 'd> !Sync for Evaluation<'c, 'd>
[src]
impl<'c, 'd> Unpin for Evaluation<'c, 'd> where
'd: 'c,
[src]
'd: 'c,
impl<'c, 'd> !UnwindSafe for Evaluation<'c, 'd>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,