pub enum ExprError {
UnexpectedChar(char),
BadNumber(String),
UnknownIdent(String),
WrongArity {
func: String,
expected: usize,
got: usize,
},
UnexpectedToken(String),
UnexpectedEnd,
TrailingTokens,
}Expand description
Why an expression failed to compile. Evaluation never errors.
Variants§
UnexpectedChar(char)
A character the tokenizer does not recognize.
BadNumber(String)
A numeric literal that does not parse as f32.
UnknownIdent(String)
An identifier that is neither a known variable nor function.
WrongArity
A function called with the wrong number of arguments.
Fields
UnexpectedToken(String)
A token appeared where the grammar did not allow it.
UnexpectedEnd
The expression ended earlier than the grammar allows.
TrailingTokens
Extra tokens remained after a complete expression.
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()
impl StructuralPartialEq for ExprError
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