pub enum Error {
Show 13 variants
Compile(LanguageError),
Runtime(LanguageError),
TooManyGlobals,
TooManyFunctions,
TooManyMethods,
TooManyArguments,
TooManyTraits,
TooManyParametersInTraitMethod,
TypeMismatch {
expected: Cow<'static, str>,
got: Cow<'static, str>,
},
ArgumentCount {
expected: usize,
got: usize,
},
ArgumentTypeMismatch {
index: usize,
expected: Cow<'static, str>,
got: Cow<'static, str>,
},
ReentrantMutableBorrow,
User(Box<dyn Error>),
}
Expand description
An error.
Variants
Compile(LanguageError)
An error occured during compilation.
Runtime(LanguageError)
An error occured during runtime.
TooManyGlobals
There are too many globals.
TooManyFunctions
Too many functions were created.
TooManyMethods
Too many methods with different signatures were declared.
TooManyArguments
Too many arguments were passed to a method or a function.
TooManyTraits
Too many traits were created.
TooManyParametersInTraitMethod
A trait method with too many parameters was created.
TypeMismatch
Fields
A type mismatch occured.
ArgumentCount
Fields
expected: usize
The number of arguments that was expected.
got: usize
The actual number of arguments obtained.
Incorrect amount of arguments passed to a function.
ArgumentTypeMismatch
Fields
index: usize
Which argument had a type mismatch.
A type mismatch occured in function arguments.
ReentrantMutableBorrow
A value was mutably borrowed twice.
User(Box<dyn Error>)
A user-defined error.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<LanguageError> for Error
impl From<LanguageError> for Error
sourcefn from(error: LanguageError) -> Self
fn from(error: LanguageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more