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

expected: Cow<'static, str>

The name of the expected type.

got: Cow<'static, str>

The name of the actual type obtained.

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.

expected: Cow<'static, str>

The name of the expected type.

got: Cow<'static, str>

The name of the actual type obtained.

A type mismatch occured in function arguments.

ReentrantMutableBorrow

A value was mutably borrowed twice.

User(Box<dyn Error>)

A user-defined error.

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.