pub enum EvalError {
StackUnderflow,
MissingUserConstant(usize),
DivisionByZero,
LogDomain,
SqrtDomain,
Overflow,
Invalid,
WithPosition {
err: Box<EvalError>,
pos: usize,
},
WithValue {
err: Box<EvalError>,
val: OrderedFloat<f64>,
},
WithExpression {
err: Box<EvalError>,
expr: String,
},
}Expand description
Evaluation error types
These errors indicate what went wrong during expression evaluation. For more detailed context, use the error message methods.
Variants§
StackUnderflow
Stack underflow during evaluation
MissingUserConstant(usize)
User constant slot referenced by the expression is not configured
DivisionByZero
Division by zero
LogDomain
Logarithm of non-positive number
SqrtDomain
Square root of negative number
Overflow
Overflow or NaN result
Invalid
Invalid expression
WithPosition
Error with position context
WithValue
Error with value context
WithExpression
Error with expression context
Implementations§
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
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 Eq for EvalError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more