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
.
Implementations on Foreign Types
impl LuaPush for i8
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for i16
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for i32
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for i64
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for u8
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for u16
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for u32
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for u64
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for usize
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for f32
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for f64
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for String
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<'s> LuaPush for &'s str
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for bool
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl LuaPush for ()
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
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)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
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)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
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)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
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)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
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)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
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)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (G, H, I, J, K, L, M)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (H, I, J, K, L, M)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (I, J, K, L, M)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (J, K, L, M)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (K, L, M)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<L: LuaPush, M: LuaPush> LuaPush for (L, M)
[src]
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<M> LuaPush for (M,) where
M: LuaPush,
[src]
M: LuaPush,
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<T> LuaPush for Vec<T> where
T: LuaPush,
[src]
T: LuaPush,
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<'a, T> LuaPush for &'a [T] where
T: Clone + LuaPush,
[src]
T: Clone + LuaPush,
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<K, V> LuaPush for HashMap<K, V> where
K: LuaPush + Eq + Hash,
V: LuaPush,
[src]
K: LuaPush + Eq + Hash,
V: LuaPush,
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
impl<K> LuaPush for HashSet<K> where
K: LuaPush + Eq + Hash,
[src]
K: LuaPush + Eq + Hash,
fn push_to_lua(self, lua: *mut lua_State) -> i32
[src]
Implementors
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,