#[non_exhaustive]pub enum LuaErrorKind {
Runtime,
Syntax,
Memory,
Callback,
External,
Conversion,
Other,
}Expand description
What kind of Lua error a LuaFailure is.
Taken from the mlua::Error variant when the error was raised by
mlua or by Rust code; a value raised from Lua with error(v) is
Runtime.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Runtime
A Lua runtime error: error(v) in Lua, or an operation on the
wrong type (mlua::Error::RuntimeError).
Syntax
The chunk did not compile (mlua::Error::SyntaxError).
Memory
The allocator refused memory (mlua::Error::MemoryError).
Callback
A Rust function called from Lua returned Err
(mlua::Error::CallbackError). This is the kind of a host
function that returns Err(mlua::Error::external(e)) and is
called from Lua: mlua wraps the error in a CallbackError on
the way through Lua.
External
A Rust error that did not pass through a Lua call
(mlua::Error::ExternalError), for example one returned by an
exec closure. Also the kind of an IsleError::Init that is
not a Lua error: the OS refused to start the VM thread, the
thread’s tokio runtime could not be built, or a pool was
configured with max_size == 0.
Conversion
A value did not convert between Lua and Rust
(FromLuaConversionError, BadArgument, serde errors).
Other
Any other mlua::Error variant.
Trait Implementations§
Source§impl Clone for LuaErrorKind
impl Clone for LuaErrorKind
impl Copy for LuaErrorKind
Source§impl Debug for LuaErrorKind
impl Debug for LuaErrorKind
impl Eq for LuaErrorKind
Source§impl Hash for LuaErrorKind
impl Hash for LuaErrorKind
Source§impl PartialEq for LuaErrorKind
impl PartialEq for LuaErrorKind
impl StructuralPartialEq for LuaErrorKind
Auto Trait Implementations§
impl Freeze for LuaErrorKind
impl RefUnwindSafe for LuaErrorKind
impl Send for LuaErrorKind
impl Sync for LuaErrorKind
impl Unpin for LuaErrorKind
impl UnsafeUnpin for LuaErrorKind
impl UnwindSafe for LuaErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more