Trait aw::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[src]

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.

Loading content...

Implementations on Foreign Types

impl<T> LuaPush for Vec<T> where
    T: LuaPush
[src]

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

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

impl<K> LuaPush for HashSet<K> where
    K: LuaPush + Eq + Hash
[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]

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]

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]

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]

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]

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]

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]

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

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

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

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

impl<L: LuaPush, M: LuaPush> LuaPush for (L, M)[src]

impl<M> LuaPush for (M,) where
    M: LuaPush
[src]

impl LuaPush for i8[src]

impl LuaPush for i16[src]

impl LuaPush for i32[src]

impl LuaPush for i64[src]

impl LuaPush for u8[src]

impl LuaPush for u16[src]

impl LuaPush for u32[src]

impl LuaPush for u64[src]

impl LuaPush for usize[src]

impl LuaPush for f32[src]

impl LuaPush for f64[src]

impl LuaPush for String[src]

impl<'s> LuaPush for &'s str[src]

impl LuaPush for bool[src]

impl LuaPush for ()[src]

Loading content...

Implementors

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

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

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, 
[src]

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, 
[src]

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, 
[src]

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, 
[src]

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, 
[src]

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, 
[src]

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, 
[src]

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, 
[src]

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, 
[src]

Loading content...