Trait hlua::Push
[−]
[src]
pub trait Push<L> where L: AsMutLua { fn push_to_lua(self, lua: L) -> PushGuard<L>; }
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: L) -> PushGuard<L>
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<L> Push<L> for AnyLuaValue where L: AsMutLua
impl<L, Z, R> Push<L> for Function<Z, (), R> where L: AsMutLua, Z: FnMut() -> R, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static> Push<L> for Function<Z, (A,), R> where L: AsMutLua, Z: FnMut(A) -> R, (A,): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static> Push<L> for Function<Z, (A, B), R> where L: AsMutLua, Z: FnMut(A, B) -> R, (A, B): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static, C: 'static> Push<L> for Function<Z, (A, B, C), R> where L: AsMutLua, Z: FnMut(A, B, C) -> R, (A, B, C): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static> Push<L> for Function<Z, (A, B, C, D), R> where L: AsMutLua, Z: FnMut(A, B, C, D) -> R, (A, B, C, D): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> Push<L> for Function<Z, (A, B, C, D, E), R> where L: AsMutLua, Z: FnMut(A, B, C, D, E) -> R, (A, B, C, D, E): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> Push<L> for Function<Z, (A, B, C, D, E, F), R> where L: AsMutLua, Z: FnMut(A, B, C, D, E, F) -> R, (A, B, C, D, E, F): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static> Push<L> for Function<Z, (A, B, C, D, E, F, G), R> where L: AsMutLua, Z: FnMut(A, B, C, D, E, F, G) -> R, (A, B, C, D, E, F, G): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static> Push<L> for Function<Z, (A, B, C, D, E, F, G, H), R> where L: AsMutLua, Z: FnMut(A, B, C, D, E, F, G, H) -> R, (A, B, C, D, E, F, G, H): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static> Push<L> for Function<Z, (A, B, C, D, E, F, G, H, I), R> where L: AsMutLua, Z: FnMut(A, B, C, D, E, F, G, H, I) -> R, (A, B, C, D, E, F, G, H, I): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static> Push<L> for Function<Z, (A, B, C, D, E, F, G, H, I, J), R> where L: AsMutLua, Z: FnMut(A, B, C, D, E, F, G, H, I, J) -> R, (A, B, C, D, E, F, G, H, I, J): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static
impl<'a, T, E> Push<&'a mut InsideCallback> for Result<T, E> where T: Push<&'a mut InsideCallback> + for<'b> Push<&'b mut &'a mut InsideCallback>, E: Debug
impl<L, T> Push<L> for Vec<T> where L: AsMutLua, T: for<'a> Push<&'a mut L>
impl<'a, L, T> Push<L> for &'a [T] where L: AsMutLua, T: Clone + for<'b> Push<&'b mut L>
impl<L, K, V> Push<L> for HashMap<K, V> where L: AsMutLua, K: for<'a, 'b> Push<&'a mut &'b mut L> + Eq + Hash, V: for<'a, 'b> Push<&'a mut &'b mut L>
impl<L, K> Push<L> for HashSet<K> where L: AsMutLua, K: for<'a, 'b> Push<&'a mut &'b mut L> + Eq + Hash
impl<L> Push<L> for i8 where L: AsMutLua
impl<L> Push<L> for i16 where L: AsMutLua
impl<L> Push<L> for i32 where L: AsMutLua
impl<L> Push<L> for u8 where L: AsMutLua
impl<L> Push<L> for u16 where L: AsMutLua
impl<L> Push<L> for u32 where L: AsMutLua
impl<L> Push<L> for f32 where L: AsMutLua
impl<L> Push<L> for f64 where L: AsMutLua
impl<L> Push<L> for String where L: AsMutLua
impl<'s, L> Push<L> for &'s str where L: AsMutLua
impl<L> Push<L> for bool where L: AsMutLua
impl<L> Push<L> for () where L: AsMutLua
impl<LU, A: for<'a> Push<&'a mut LU>, B: for<'a> Push<&'a mut LU>, C: for<'a> Push<&'a mut LU>, D: for<'a> Push<&'a mut LU>, E: for<'a> Push<&'a mut LU>, F: for<'a> Push<&'a mut LU>, G: for<'a> Push<&'a mut LU>, H: for<'a> Push<&'a mut LU>, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (A, B, C, D, E, F, G, H, I, J, K, L, M) where LU: AsMutLua
impl<LU, B: for<'a> Push<&'a mut LU>, C: for<'a> Push<&'a mut LU>, D: for<'a> Push<&'a mut LU>, E: for<'a> Push<&'a mut LU>, F: for<'a> Push<&'a mut LU>, G: for<'a> Push<&'a mut LU>, H: for<'a> Push<&'a mut LU>, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (B, C, D, E, F, G, H, I, J, K, L, M) where LU: AsMutLua
impl<LU, C: for<'a> Push<&'a mut LU>, D: for<'a> Push<&'a mut LU>, E: for<'a> Push<&'a mut LU>, F: for<'a> Push<&'a mut LU>, G: for<'a> Push<&'a mut LU>, H: for<'a> Push<&'a mut LU>, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (C, D, E, F, G, H, I, J, K, L, M) where LU: AsMutLua
impl<LU, D: for<'a> Push<&'a mut LU>, E: for<'a> Push<&'a mut LU>, F: for<'a> Push<&'a mut LU>, G: for<'a> Push<&'a mut LU>, H: for<'a> Push<&'a mut LU>, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (D, E, F, G, H, I, J, K, L, M) where LU: AsMutLua
impl<LU, E: for<'a> Push<&'a mut LU>, F: for<'a> Push<&'a mut LU>, G: for<'a> Push<&'a mut LU>, H: for<'a> Push<&'a mut LU>, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (E, F, G, H, I, J, K, L, M) where LU: AsMutLua
impl<LU, F: for<'a> Push<&'a mut LU>, G: for<'a> Push<&'a mut LU>, H: for<'a> Push<&'a mut LU>, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (F, G, H, I, J, K, L, M) where LU: AsMutLua
impl<LU, G: for<'a> Push<&'a mut LU>, H: for<'a> Push<&'a mut LU>, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (G, H, I, J, K, L, M) where LU: AsMutLua
impl<LU, H: for<'a> Push<&'a mut LU>, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (H, I, J, K, L, M) where LU: AsMutLua
impl<LU, I: for<'a> Push<&'a mut LU>, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (I, J, K, L, M) where LU: AsMutLua
impl<LU, J: for<'a> Push<&'a mut LU>, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (J, K, L, M) where LU: AsMutLua
impl<LU, K: for<'a> Push<&'a mut LU>, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (K, L, M) where LU: AsMutLua
impl<LU, L: for<'a> Push<&'a mut LU>, M: for<'a> Push<&'a mut LU>> Push<LU> for (L, M) where LU: AsMutLua
impl<LU, M> Push<LU> for (M,) where LU: AsMutLua, M: Push<LU>