Trait td_rlua::LuaPush

source ·
pub trait LuaPush {
    // Required method
    fn push_to_lua(self, lua: *mut lua_State) -> i32;
}
Expand description

Types that can be given to a Lua context, for example with lua.set() or as a return value of a function.

Required Methods§

source

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§

source§

impl LuaPush for bool

source§

impl LuaPush for f32

source§

impl LuaPush for f64

source§

impl LuaPush for i8

source§

impl LuaPush for i16

source§

impl LuaPush for i32

source§

impl LuaPush for i64

source§

impl LuaPush for u8

source§

impl LuaPush for u16

source§

impl LuaPush for u32

source§

impl LuaPush for u64

source§

impl LuaPush for ()

source§

impl LuaPush for usize

source§

impl LuaPush for String

source§

impl<'a, T> LuaPush for &'a [T]
where T: Clone + LuaPush,

source§

impl<'s> LuaPush for &'s str

source§

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)

source§

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)

source§

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)

source§

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)

source§

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)

source§

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)

source§

impl<G: LuaPush, H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (G, H, I, J, K, L, M)

source§

impl<H: LuaPush, I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (H, I, J, K, L, M)

source§

impl<I: LuaPush, J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (I, J, K, L, M)

source§

impl<J: LuaPush, K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (J, K, L, M)

source§

impl<K> LuaPush for HashSet<K>
where K: LuaPush + Eq + Hash,

source§

impl<K, V> LuaPush for HashMap<K, V>
where K: LuaPush + Eq + Hash, V: LuaPush,

source§

impl<K: LuaPush, L: LuaPush, M: LuaPush> LuaPush for (K, L, M)

source§

impl<L: LuaPush, M: LuaPush> LuaPush for (L, M)

source§

impl<M> LuaPush for (M,)
where M: LuaPush,

source§

impl<T> LuaPush for Vec<T>
where T: LuaPush,

Implementors§

source§

impl LuaPush for &RawString

source§

impl LuaPush for RawString

source§

impl<Z, R> LuaPush for Function<Z, (), R>
where Z: FnMut() -> R, R: LuaPush + 'static,

source§

impl<Z, R, A: 'static> LuaPush for Function<Z, (A,), R>
where Z: FnMut(A) -> R, (A,): LuaRead, R: LuaPush + 'static,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,