pub trait FromLua: Sized {
// Required method
fn from_lua(value: Value, lua: &Lua) -> Result<Self>;
// Provided method
fn from_lua_arg(
arg: Value,
_i: usize,
_to: Option<&str>,
lua: &Lua,
) -> Result<Self> { ... }
}Expand description
Convert a single Lua Value into a Rust value.
Mirrors mlua::FromLua.
Required Methods§
Provided Methods§
Sourcefn from_lua_arg(
arg: Value,
_i: usize,
_to: Option<&str>,
lua: &Lua,
) -> Result<Self>
fn from_lua_arg( arg: Value, _i: usize, _to: Option<&str>, lua: &Lua, ) -> Result<Self>
Convert an argument at 1-based position i. The default forwards to
FromLua::from_lua; specific impls can produce nicer messages.
Mirrors mlua::FromLua::from_lua_arg.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".