[−][src]Enum arithmetic_eval::EvalError
Errors that can occur during interpreting expressions and statements.
Variants
Mismatch between length of tuples in a binary operation or assignment.
Fields of TupleLenMismatch
lhs: LvalueLen
Length of a tuple on the left-hand side.
rhs: usize
Length of a tuple on the right-hand side.
context: TupleLenMismatchContext
Context in which the error has occurred.
Mismatch between the number of arguments in the function definition and its call.
Fields of ArgsLenMismatch
Cannot destructure a non-tuple variable.
Repeated assignment to the same variable in function args or tuple destructuring.
Fields of RepeatedAssignment
context: RepeatedAssignmentContext
Context in which the error has occurred.
Undefined(String)
Variable with the enclosed name is not defined.
Value is not callable (i.e., is not a function).
NativeCall(String)
Generic error during execution of a native function.
Unexpected operand type for the specified operation.
Fields of UnexpectedOperand
op: Op
Operation which failed.
Implementations
impl EvalError
[src]
pub fn native(message: impl Into<String>) -> Self
[src]
Creates a native error.
pub fn to_short_string(&self) -> String
[src]
Returned shortened error cause.
pub fn main_span_info(&self) -> String
[src]
Returns a short description of the spanned information.
pub fn help(&self) -> Option<String>
[src]
Returns information helping fix the error.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EvalError
impl Send for EvalError
impl Sync for EvalError
impl Unpin for EvalError
impl UnwindSafe for EvalError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,