Trait nvim_utils::prelude::ToLuaMulti
source · pub trait ToLuaMulti<'lua> {
// Required method
fn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>;
}
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>, Error>
fn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>
Performs the conversion.
Implementations on Foreign Types§
source§impl<'lua, B, C, D, E, F, G, H, I, J, K, L, M, N, O, A> ToLuaMulti<'lua> for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, A)where
B: ToLua<'lua>,
C: ToLua<'lua>,
D: ToLua<'lua>,
E: ToLua<'lua>,
F: ToLua<'lua>,
G: ToLua<'lua>,
H: ToLua<'lua>,
I: ToLua<'lua>,
J: ToLua<'lua>,
K: ToLua<'lua>,
L: ToLua<'lua>,
M: ToLua<'lua>,
N: ToLua<'lua>,
O: ToLua<'lua>,
A: ToLuaMulti<'lua>,
impl<'lua, B, C, D, E, F, G, H, I, J, K, L, M, N, O, A> ToLuaMulti<'lua> for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, A)where B: ToLua<'lua>, C: ToLua<'lua>, D: ToLua<'lua>, E: ToLua<'lua>, F: ToLua<'lua>, G: ToLua<'lua>, H: ToLua<'lua>, I: ToLua<'lua>, J: ToLua<'lua>, K: ToLua<'lua>, L: ToLua<'lua>, M: ToLua<'lua>, N: ToLua<'lua>, O: ToLua<'lua>, A: ToLuaMulti<'lua>,
fn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>
source§impl<'lua, T, E> ToLuaMulti<'lua> for Result<T, E>where
T: ToLua<'lua>,
E: ToLua<'lua>,
impl<'lua, T, E> ToLuaMulti<'lua> for Result<T, E>where T: ToLua<'lua>, E: ToLua<'lua>,
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.