pub(crate) struct EvaluationCtx<D: Dom> {
pub(crate) starting_node: D::Node,
pub(crate) context_node: D::Node,
pub(crate) predicate_ctx: Option<PredicateCtx>,
pub(crate) resolver: Option<D::NamespaceResolver>,
}
Expand description
The context during evaluation of an XPath expression.
Fields§
§starting_node: D::Node
Where we started at.
context_node: D::Node
The “current” node in the evaluation.
predicate_ctx: Option<PredicateCtx>
Details needed for evaluating a predicate list.
resolver: Option<D::NamespaceResolver>
A list of known namespace prefixes.
Implementations§
Source§impl<D: Dom> EvaluationCtx<D>
impl<D: Dom> EvaluationCtx<D>
Sourcepub(crate) fn new(
context_node: D::Node,
resolver: Option<D::NamespaceResolver>,
) -> Self
pub(crate) fn new( context_node: D::Node, resolver: Option<D::NamespaceResolver>, ) -> Self
Prepares the context used while evaluating the XPath expression
Sourcepub(crate) fn subcontext_for_node(&self, node: D::Node) -> Self
pub(crate) fn subcontext_for_node(&self, node: D::Node) -> Self
Creates a new context using the provided node as the context node
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for EvaluationCtx<D>
impl<D> RefUnwindSafe for EvaluationCtx<D>
impl<D> Send for EvaluationCtx<D>
impl<D> Sync for EvaluationCtx<D>
impl<D> Unpin for EvaluationCtx<D>
impl<D> UnwindSafe for EvaluationCtx<D>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert