Struct script::xpath::context::EvaluationCtx
source · pub struct EvaluationCtx {
pub starting_node: Root<Dom<Node>>,
pub context_node: Root<Dom<Node>>,
pub predicate_ctx: Option<PredicateCtx>,
pub predicate_nodes: Option<Vec<Root<Dom<Node>>>>,
}
Expand description
The context during evaluation of an XPath expression.
Fields§
§starting_node: Root<Dom<Node>>
Where we started at
context_node: Root<Dom<Node>>
The “current” node in the evaluation
predicate_ctx: Option<PredicateCtx>
Details needed for evaluating a predicate list
predicate_nodes: Option<Vec<Root<Dom<Node>>>>
The nodes we’re currently matching against
Implementations§
source§impl EvaluationCtx
impl EvaluationCtx
sourcepub fn new(context_node: &Node) -> EvaluationCtx
pub fn new(context_node: &Node) -> EvaluationCtx
Prepares the context used while evaluating the XPath expression
sourcepub fn subcontext_for_node(&self, node: &Node) -> EvaluationCtx
pub fn subcontext_for_node(&self, node: &Node) -> EvaluationCtx
Creates a new context using the provided node as the context node
pub fn update_predicate_nodes(&self, nodes: Vec<&Node>) -> EvaluationCtx
pub 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