Error type returned by
Syntax error while parsing Lua source code.
Fields of SyntaxError
Lua runtime error, aka
The Lua VM returns this error when a builtin operation is performed on incompatible types.
Among other things, this includes invoking operators on wrong types (such as calling or
Lua memory error, aka
The Lua VM returns this error when the allocator does not return the requested memory, aka it is an out-of-memory error.
Lua garbage collector error, aka
The Lua VM returns this error when there is an error running a
A mutable callback has triggered Lua code that has called the same mutable callback again.
This is an error because a mutable callback can only be borrowed mutably once.
Either a callback or a userdata method has been called, but the callback or userdata has been destructed.
This can happen either due to to being destructed in a previous __gc, or due to being
destructed from exiting a
Not enough stack space to place arguments to Lua functions or return values from callbacks.
Due to the way
mlua works, it should not be directly possible to run out of stack space
during normal use. The only way that this error can be triggered is if a
called with a huge number of arguments, or a rust callback returns a huge number of return
Too many arguments to
A Rust value could not be converted to a Lua value.
Fields of ToLuaConversionError
A Lua value could not be converted to the expected Rust type.
Fields of FromLuaConversionError
Thread::resume was called on an inactive coroutine.
A coroutine is inactive if its main function has returned or if an error has occured inside the coroutine.
Thread::status can be used to check if the coroutine can be resumed without causing this
AnyUserData is not the expected type in a borrow.
AnyUserData immutable borrow failed because it is already borrowed mutably.
AnyUserData mutable borrow failed because it is already borrowed.
RegistryKey produced from a different Lua state was used.
A Rust callback returned
Err, raising the contained
Error as a Lua error.
Fields of CallbackError
A custom error.
This can be used for returning user-defined errors from callbacks.
Err(ExternalError(...)) from a Rust callback will raise the error as a Lua
error. The Rust code that originally invoked the Lua code then receives a
from which the original error (and a stack traceback) can be recovered.
fn description(&self) -> &str1.0.0[src]
impl From<AddrParseError> for Error[src]
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.