pub enum ErrorKind {
Show 20 variants
Return(ConValue),
Break(ConValue),
BadBreak(ConValue),
Continue,
StackUnderflow,
StackOverflow(usize),
ScopeExit,
TypeError(&'static str, &'static str),
NotIterable,
NotIndexable,
OobIndex(usize, usize),
NotPlace,
NotDefined(Symbol),
NotInitialized(Symbol),
NotCallable(ConValue),
ArgNumber {
want: usize,
got: usize,
},
PatFailed(Box<Pat>),
MatchNonexhaustive(ConValue),
Panic(String, usize),
BuiltinError(String),
}Expand description
Represents any error thrown by the Environment
Variants§
Return(ConValue)
Propagate a Return value
Break(ConValue)
Propagate a Break value
BadBreak(ConValue)
Break propagated across function bounds
Continue
Continue to the next iteration of a loop
StackUnderflow
Underflowed the stack
StackOverflow(usize)
Overflowed the stack
ScopeExit
Exited the last scope
TypeError(&'static str, &'static str)
Type incompatibility
NotIterable
In clause of For loop didn’t yield a Range
NotIndexable
A value could not be indexed
OobIndex(usize, usize)
An array index went out of bounds
NotPlace
An expression is not assignable
NotDefined(Symbol)
A name was not defined in scope before being used
NotInitialized(Symbol)
A name was defined but not initialized
NotCallable(ConValue)
A value was called, but is not callable
ArgNumber
A function was called with the wrong number of arguments
PatFailed(Box<Pat>)
A pattern failed to match
MatchNonexhaustive(ConValue)
Fell through a non-exhaustive match
Panic(String, usize)
Explicit panic
BuiltinError(String)
Error produced by a Builtin
Trait Implementations§
Source§impl Error for ErrorKind
impl Error for ErrorKind
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 ErrorKind
impl !RefUnwindSafe for ErrorKind
impl !Send for ErrorKind
impl !Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl !UnwindSafe for ErrorKind
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