Trait td_rlua::LuaPush
[−]
[src]
pub trait LuaPush {
fn push_to_lua(self, lua: *mut lua_State) -> i32;
}Types that can be given to a Lua context, for example with lua.set() or as a return value
of a function.
Required Methods
fn push_to_lua(self, lua: *mut lua_State) -> i32
Pushes the value on the top of the stack.
Must return a guard representing the elements that have been pushed.
You can implement this for any type you want by redirecting to call to
another implementation (for example 5.push_to_lua) or by calling
userdata::push_userdata.
Implementors
impl LuaPush for i8impl LuaPush for i16impl LuaPush for i32impl LuaPush for u8impl LuaPush for u16impl LuaPush for u32impl LuaPush for usizeimpl LuaPush for f32impl LuaPush for f64impl LuaPush for Stringimpl<'s> LuaPush for &'s strimpl LuaPush for boolimpl LuaPush for ()impl<Z, R> LuaPush for Function<Z, (), R> where
Z: FnMut() -> R,
R: LuaPush + 'static,impl<Z, R, A: 'static> LuaPush for Function<Z, (A,), R> where
Z: FnMut(A) -> R,
(A,): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static> LuaPush for Function<Z, (A, B), R> where
Z: FnMut(A, B) -> R,
(A, B): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static, C: 'static> LuaPush for Function<Z, (A, B, C), R> where
Z: FnMut(A, B, C) -> R,
(A, B, C): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static, C: 'static, D: 'static> LuaPush for Function<Z, (A, B, C, D), R> where
Z: FnMut(A, B, C, D) -> R,
(A, B, C, D): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> LuaPush for Function<Z, (A, B, C, D, E), R> where
Z: FnMut(A, B, C, D, E) -> R,
(A, B, C, D, E): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> LuaPush for Function<Z, (A, B, C, D, E, F), R> where
Z: FnMut(A, B, C, D, E, F) -> R,
(A, B, C, D, E, F): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static> LuaPush for Function<Z, (A, B, C, D, E, F, G), R> where
Z: FnMut(A, B, C, D, E, F, G) -> R,
(A, B, C, D, E, F, G): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static> LuaPush for Function<Z, (A, B, C, D, E, F, G, H), R> where
Z: FnMut(A, B, C, D, E, F, G, H) -> R,
(A, B, C, D, E, F, G, H): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static> LuaPush for Function<Z, (A, B, C, D, E, F, G, H, I), R> where
Z: FnMut(A, B, C, D, E, F, G, H, I) -> R,
(A, B, C, D, E, F, G, H, I): LuaRead,
R: LuaPush + 'static,impl<Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static> LuaPush for Function<Z, (A, B, C, D, E, F, G, H, I, J), R> where
Z: FnMut(A, B, C, D, E, F, G, H, I, J) -> R,
(A, B, C, D, E, F, G, H, I, J): LuaRead,
R: LuaPush + 'static,impl<A: LuaPush, B: LuaPush, C: LuaPush, D: LuaPush, E: LuaPush, F: LuaPush, G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (A, B, C, D, E, F, G, H, I, J, K, L, M)impl<B: LuaPush, C: LuaPush, D: LuaPush, E: LuaPush, F: LuaPush, G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (B, C, D, E, F, G, H, I, J, K, L, M)impl<C: LuaPush, D: LuaPush, E: LuaPush, F: LuaPush, G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (C, D, E, F, G, H, I, J, K, L, M)impl<D: LuaPush, E: LuaPush, F: LuaPush, G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (D, E, F, G, H, I, J, K, L, M)impl<E: LuaPush, F: LuaPush, G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (E, F, G, H, I, J, K, L, M)impl<F: LuaPush, G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (F, G, H, I, J, K, L, M)impl<G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (G, H, I, J, K, L, M)impl<H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (H, I, J, K, L, M)impl<I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (I, J, K, L, M)impl<J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (J, K, L, M)impl<K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (K, L, M)impl<L: LuaPush, M: LuaPush> LuaPush for (L, M)impl<M> LuaPush for (M,) where
M: LuaPush,impl<T> LuaPush for Vec<T> where
T: LuaPush,impl<'a, T> LuaPush for &'a [T] where
T: Clone + LuaPush,impl<K, V> LuaPush for HashMap<K, V> where
K: LuaPush + Eq + Hash,
V: LuaPush,impl<K> LuaPush for HashSet<K> where
K: LuaPush + Eq + Hash,