pub trait FromLua: Sized {
// Required method
fn from_lua(value: LuaValue, state: &LuaState) -> Result<Self, String>;
}Expand description
Convert a LuaValue into a Rust type.
Implementors define how a Lua value is converted to Self.
Return Err(message) for type mismatches.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.