pub enum EvalError {
EvalParseError(String),
UnboundVariable {
name: String,
},
TypeError {
operation: String,
expected: String,
actual: String,
context: String,
},
NullInOperation {
operation: String,
context: String,
},
DivisionByZero {
expression: String,
},
InvalidLiteral {
literal: String,
literal_type: String,
error: String,
},
}Expand description
Comprehensive error type for evaluation failures
Variants§
EvalParseError(String)
Parse error from the parser
UnboundVariable
Variable referenced but not found in value map
TypeError
Type mismatch in operation
Fields
NullInOperation
NULL used in arithmetic or comparison operation (not IS NULL/IS NOT NULL)
DivisionByZero
Division by zero
InvalidLiteral
Invalid literal format
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()
Source§impl From<ParseError> for EvalError
impl From<ParseError> for EvalError
Source§fn from(msg: ParseError) -> Self
fn from(msg: ParseError) -> Self
Converts to this type from the input type.
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