pub struct TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N: DomNavigator> { /* private fields */ }Expand description
A typed evaluator that allows binding arbitrary XPathValue<N> values.
This is used within run_with callbacks to set variables that cannot be
represented as simple EvalValue (like nodes or sequences).
Implementations§
Source§impl<'expr, 'ctx, 'dyn_ctx, N: DomNavigator> TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
impl<'expr, 'ctx, 'dyn_ctx, N: DomNavigator> TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
Sourcepub fn set_variable_by_name(
&mut self,
name: &str,
value: XPathValue<N>,
) -> Result<(), XPathError>
pub fn set_variable_by_name( &mut self, name: &str, value: XPathValue<N>, ) -> Result<(), XPathError>
Set a variable by name to an arbitrary XPath value.
This allows binding nodes, sequences, empty sequences, or any other
XPathValue<N> to an external variable.
§Errors
Returns XPST0008 if the variable was not declared at compile time.
Sourcepub fn set_variable(&mut self, slot: VarSlotId, value: XPathValue<N>)
pub fn set_variable(&mut self, slot: VarSlotId, value: XPathValue<N>)
Set a variable by slot ID directly.
Use this when you already know the slot ID (e.g., from ExternalVar::slot).
Sourcepub fn context(&mut self) -> &mut DynamicContext<'ctx, N>
pub fn context(&mut self) -> &mut DynamicContext<'ctx, N>
Get a reference to the dynamic context for advanced manipulation.
Auto Trait Implementations§
impl<'expr, 'ctx, 'dyn_ctx, N> !RefUnwindSafe for TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
impl<'expr, 'ctx, 'dyn_ctx, N> !Send for TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
impl<'expr, 'ctx, 'dyn_ctx, N> !Sync for TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
impl<'expr, 'ctx, 'dyn_ctx, N> !UnwindSafe for TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
impl<'expr, 'ctx, 'dyn_ctx, N> Freeze for TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
impl<'expr, 'ctx, 'dyn_ctx, N> Unpin for TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
impl<'expr, 'ctx, 'dyn_ctx, N> UnsafeUnpin for TypedEvaluator<'expr, 'ctx, 'dyn_ctx, N>
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