pub enum EvalError {
UnknownFunction(QName),
UnboundVariable(QName),
ArgumentCount {
function: &'static str,
expected: usize,
got: usize,
},
ExpectedNodeSet {
context: &'static str,
},
}Expand description
An evaluation-time error. Distinct from ParseError (parser.rs), which
covers syntax — this covers semantic failures once a well-formed Expr
is evaluated against a concrete context.
Variants§
UnknownFunction(QName)
PrimaryExpr::Function named something other than one of the 27
implemented core-library functions (last/position/count,
Phase 04, plus the 24 more in functions.rs, Phase 05 — including
id(), see its doc comment there).
UnboundVariable(QName)
PrimaryExpr::Variable has no binding via the context’s lookup hook.
ArgumentCount
A function called with the wrong number of arguments.
ExpectedNodeSet
count()’s argument, or a Union/FilterExpr-predicate operand,
did not evaluate to a node-set.
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for EvalError
Auto Trait Implementations§
impl Freeze for EvalError
impl RefUnwindSafe for EvalError
impl Send for EvalError
impl Sync for EvalError
impl Unpin for EvalError
impl UnsafeUnpin for EvalError
impl UnwindSafe for EvalError
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