#[non_exhaustive]pub enum ExprError {
Show 14 variants
StepLimitExceeded(u64),
DepthExceeded(u32),
UnboundVariable(String),
TypeError {
expected: String,
got: String,
},
ArityMismatch {
op: String,
expected: usize,
got: usize,
},
IndexOutOfBounds {
index: i64,
len: usize,
},
FieldNotFound(String),
NonExhaustiveMatch,
DivisionByZero,
ListLengthExceeded(usize),
ParseError {
value: String,
target_type: String,
},
NotAFunction,
Overflow,
FloatNotRepresentable(String),
}Expand description
Errors that can occur during expression evaluation or type-checking.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
StepLimitExceeded(u64)
Evaluation exceeded the configured step limit.
DepthExceeded(u32)
Evaluation exceeded the configured recursion depth.
UnboundVariable(String)
A variable was referenced but not bound in the environment.
TypeError
An operation received a value of the wrong type.
ArityMismatch
A builtin was applied to the wrong number of arguments.
Fields
IndexOutOfBounds
List index was out of bounds.
FieldNotFound(String)
A field was not found in a record.
NonExhaustiveMatch
No pattern arm matched the scrutinee.
DivisionByZero
Division by zero.
ListLengthExceeded(usize)
A list operation exceeded the configured maximum list length.
ParseError
Failed to parse a string as a number.
Fields
NotAFunction
Attempted to call a non-function value.
Overflow
Integer arithmetic overflowed.
FloatNotRepresentable(String)
Float value is not representable as an integer (NaN, infinity, or out of range).
Trait Implementations§
Source§impl Error for ExprError
impl Error for ExprError
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()
Auto Trait Implementations§
impl Freeze for ExprError
impl RefUnwindSafe for ExprError
impl Send for ExprError
impl Sync for ExprError
impl Unpin for ExprError
impl UnsafeUnpin for ExprError
impl UnwindSafe for ExprError
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