Trait me3_framework::scripting::lua::FromLuaMulti
source · [−]pub trait FromLuaMulti<'lua> {
fn from_lua_multi(
values: MultiValue<'lua>,
lua: &'lua Lua
) -> Result<Self, Error>;
}
Expand description
Trait for types that can be created from an arbitrary number of Lua values.
This is a generalization of FromLua
, allowing an arbitrary number of Lua values to participate
in the conversion. Any type that implements FromLua
will automatically implement this trait.
Required Methods
sourcefn from_lua_multi(
values: MultiValue<'lua>,
lua: &'lua Lua
) -> Result<Self, Error>
fn from_lua_multi(
values: MultiValue<'lua>,
lua: &'lua Lua
) -> Result<Self, Error>
Performs the conversion.
In case values
contains more values than needed to perform the conversion, the excess
values should be ignored. This reflects the semantics of Lua when calling a function or
assigning values. Similarly, if not enough values are given, conversions should assume that
any missing values are nil.