Trait mlua::ToLuaMulti
source · [−]pub trait ToLuaMulti<'lua> {
fn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>>;
}
Expand description
Trait for types convertible to any number of Lua values.
This is a generalization of ToLua
, allowing any number of resulting Lua values instead of just
one. Any type that implements ToLua
will automatically implement this trait.
Required Methods
sourcefn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>>
fn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>>
Performs the conversion.
Implementations on Foreign Types
sourceimpl<'lua, T: ToLua<'lua>, E: ToLua<'lua>> ToLuaMulti<'lua> for StdResult<T, E>
impl<'lua, T: ToLua<'lua>, E: ToLua<'lua>> ToLuaMulti<'lua> for StdResult<T, E>
Result is convertible to MultiValue
following the common Lua idiom of returning the result
on success, or in the case of an error, returning nil
and an error message.