pub(crate) struct EvaluationCtx {
pub(crate) starting_node: DomRoot<Node>,
pub(crate) context_node: DomRoot<Node>,
pub(crate) predicate_ctx: Option<PredicateCtx>,
pub(crate) predicate_nodes: Option<Vec<DomRoot<Node>>>,
}
Expand description
The context during evaluation of an XPath expression.
Fields§
§starting_node: DomRoot<Node>
Where we started at
context_node: DomRoot<Node>
The “current” node in the evaluation
predicate_ctx: Option<PredicateCtx>
Details needed for evaluating a predicate list
predicate_nodes: Option<Vec<DomRoot<Node>>>
The nodes we’re currently matching against
Implementations§
Source§impl EvaluationCtx
impl EvaluationCtx
Sourcepub(crate) fn new(context_node: &Node) -> EvaluationCtx
pub(crate) fn new(context_node: &Node) -> EvaluationCtx
Prepares the context used while evaluating the XPath expression
Sourcepub(crate) fn subcontext_for_node(&self, node: &Node) -> EvaluationCtx
pub(crate) fn subcontext_for_node(&self, node: &Node) -> EvaluationCtx
Creates a new context using the provided node as the context node
pub(crate) fn update_predicate_nodes(&self, nodes: Vec<&Node>) -> EvaluationCtx
pub(crate) fn subcontext_iter_for_nodes(&self) -> EvalNodesetIter<'_> ⓘ
Auto Trait Implementations§
impl Freeze for EvaluationCtx
impl !RefUnwindSafe for EvaluationCtx
impl !Send for EvaluationCtx
impl !Sync for EvaluationCtx
impl Unpin for EvaluationCtx
impl !UnwindSafe for EvaluationCtx
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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