Trait rlua::FromLuaMulti
[−]
[src]
pub trait FromLuaMulti<'a>: Sized { fn from_lua_multi(
values: LuaMultiValue<'a>,
lua: &'a Lua
) -> LuaResult<Self>; }
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
fn from_lua_multi(values: LuaMultiValue<'a>, lua: &'a Lua) -> LuaResult<Self>
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.
Implementors
impl<'lua> FromLuaMulti<'lua> for ()
impl<'lua, T: FromLua<'lua>> FromLuaMulti<'lua> for T
impl<'lua> FromLuaMulti<'lua> for LuaMultiValue<'lua>
impl<'lua, T: FromLua<'lua>> FromLuaMulti<'lua> for LuaVariadic<T>
impl<'lua> FromLuaMulti<'lua> for HNil
impl<'lua, T: FromLuaMulti<'lua>> FromLuaMulti<'lua> for HCons<T, HNil>
impl<'lua, H: FromLua<'lua>, A, B> FromLuaMulti<'lua> for HCons<H, HCons<A, B>> where
HCons<A, B>: FromLuaMulti<'lua>,