Trait tlua::PushOne

source ·
pub trait PushOne<L: AsLua>: Push<L> { }
Expand description

Extension trait for Push. Guarantees that only one element will be pushed.

This should be implemented on most types that implement Push, except for tuples.

Note: Implementing this trait on a type that pushes multiple elements will most likely result in panics.

Implementations on Foreign Types§

source§

impl<LU, M> PushOne<LU> for (M,)where LU: AsLua, M: PushOne<LU>,

source§

impl<L> PushOne<L> for usizewhere L: AsLua,

source§

impl<L> PushOne<L> for u16where L: AsLua,

source§

impl<L, K, V> PushOne<L> for HashMap<K, V>where L: AsLua, K: PushOne<LuaState> + Eq + Hash + Debug, V: PushOne<LuaState> + Debug,

source§

impl<L> PushOne<L> for i32where L: AsLua,

source§

impl<L, K> PushOne<L> for HashSet<K>where L: AsLua, K: PushOne<LuaState> + Eq + Hash + Debug,

source§

impl<L> PushOne<L> for u8where L: AsLua,

source§

impl<L> PushOne<L> for i16where L: AsLua,

source§

impl<L, T> PushOne<L> for Option<T>where T: PushOne<L>, L: AsLua,

source§

impl<L> PushOne<L> for CStrwhere L: AsLua,

source§

impl<T, L> PushOne<L> for &Twhere L: AsLua, T: ?Sized + PushOne<L>,

source§

impl<L, T> PushOne<L> for [T]where L: AsLua, T: Push<LuaState>,

source§

impl<L> PushOne<L> for f64where L: AsLua,

source§

impl<L> PushOne<L> for i8where L: AsLua,

source§

impl<L> PushOne<L> for isizewhere L: AsLua,

source§

impl<L> PushOne<L> for boolwhere L: AsLua,

source§

impl<L> PushOne<L> for strwhere L: AsLua,

source§

impl<L, T, const N: usize> PushOne<L> for [T; N]where L: AsLua, T: Push<LuaState>,

source§

impl<L> PushOne<L> for f32where L: AsLua,

source§

impl<L> PushOne<L> for i64where L: AsLua,

source§

impl<L, T> PushOne<L> for Vec<T>where L: AsLua, T: Push<LuaState>,

source§

impl<L> PushOne<L> for u64where L: AsLua,

source§

impl<L> PushOne<L> for u32where L: AsLua,

source§

impl<L> PushOne<L> for Stringwhere L: AsLua,

source§

impl<L> PushOne<L> for ()where L: AsLua,

source§

impl<L> PushOne<L> for CStringwhere L: AsLua,

Implementors§

source§

impl<'c, L> PushOne<L> for LuaCode<'c>where L: AsLua,

source§

impl<L> PushOne<L> for AnyLuaStringwhere L: AsLua,

source§

impl<L> PushOne<L> for Falsewhere L: AsLua,

source§

impl<L> PushOne<L> for Nilwhere L: AsLua,

source§

impl<L> PushOne<L> for Nullwhere L: AsLua,

source§

impl<L> PushOne<L> for Object<L>where L: AsLua,

source§

impl<L> PushOne<L> for Truewhere L: AsLua,

source§

impl<L, T> PushOne<L> for Callable<T>where L: AsLua, T: AsLua,

source§

impl<L, T> PushOne<L> for Indexable<T>where L: AsLua, T: AsLua,

source§

impl<L, T> PushOne<L> for IndexableRW<T>where L: AsLua, T: AsLua,

source§

impl<L, T> PushOne<L> for LuaFunction<T>where L: AsLua, T: AsLua,

source§

impl<L, T> PushOne<L> for LuaTable<T>where L: AsLua, T: AsLua,

source§

impl<L, Z, R> PushOne<L> for Function<Z, (), R>where L: AsLua, Z: FnMut() -> R, Self: Copy + 'static, (): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (A, B, C, D, E, F, G, H, I, J, K, M, N), R>where L: AsLua, Z: FnMut(A, B, C, D, E, F, G, H, I, J, K, M, N) -> R, Self: Copy + 'static, (A, B, C, D, E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (B, C, D, E, F, G, H, I, J, K, M, N), R>where L: AsLua, Z: FnMut(B, C, D, E, F, G, H, I, J, K, M, N) -> R, Self: Copy + 'static, (B, C, D, E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (C, D, E, F, G, H, I, J, K, M, N), R>where L: AsLua, Z: FnMut(C, D, E, F, G, H, I, J, K, M, N) -> R, Self: Copy + 'static, (C, D, E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (D, E, F, G, H, I, J, K, M, N), R>where L: AsLua, Z: FnMut(D, E, F, G, H, I, J, K, M, N) -> R, Self: Copy + 'static, (D, E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (E, F, G, H, I, J, K, M, N), R>where L: AsLua, Z: FnMut(E, F, G, H, I, J, K, M, N) -> R, Self: Copy + 'static, (E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (F, G, H, I, J, K, M, N), R>where L: AsLua, Z: FnMut(F, G, H, I, J, K, M, N) -> R, Self: Copy + 'static, (F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (G, H, I, J, K, M, N), R>where L: AsLua, Z: FnMut(G, H, I, J, K, M, N) -> R, Self: Copy + 'static, (G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (H, I, J, K, M, N), R>where L: AsLua, Z: FnMut(H, I, J, K, M, N) -> R, Self: Copy + 'static, (H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (I, J, K, M, N), R>where L: AsLua, Z: FnMut(I, J, K, M, N) -> R, Self: Copy + 'static, (I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, J: 'static, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (J, K, M, N), R>where L: AsLua, Z: FnMut(J, K, M, N) -> R, Self: Copy + 'static, (J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, K: 'static, M: 'static, N: 'static> PushOne<L> for Function<Z, (K, M, N), R>where L: AsLua, Z: FnMut(K, M, N) -> R, Self: Copy + 'static, (K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, M: 'static, N: 'static> PushOne<L> for Function<Z, (M, N), R>where L: AsLua, Z: FnMut(M, N) -> R, Self: Copy + 'static, (M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L, Z, R, N: 'static> PushOne<L> for Function<Z, (N,), R>where L: AsLua, Z: FnMut(N) -> R, Self: Copy + 'static, (N,): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

source§

impl<L: AsLua> PushOne<L> for AnyHashableLuaValue

source§

impl<L: AsLua> PushOne<L> for AnyLuaValue

source§

impl<LU, A, B, C, D, E, F, G, H, I, J, K, L, M> PushOne<LU> for AsTable<(A, B, C, D, E, F, G, H, I, J, K, L, M)>where LU: AsLua, A: Push<LuaState>, B: Push<LuaState>, C: Push<LuaState>, D: Push<LuaState>, E: Push<LuaState>, F: Push<LuaState>, G: Push<LuaState>, H: Push<LuaState>, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, B, C, D, E, F, G, H, I, J, K, L, M> PushOne<LU> for AsTable<(B, C, D, E, F, G, H, I, J, K, L, M)>where LU: AsLua, B: Push<LuaState>, C: Push<LuaState>, D: Push<LuaState>, E: Push<LuaState>, F: Push<LuaState>, G: Push<LuaState>, H: Push<LuaState>, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, C, D, E, F, G, H, I, J, K, L, M> PushOne<LU> for AsTable<(C, D, E, F, G, H, I, J, K, L, M)>where LU: AsLua, C: Push<LuaState>, D: Push<LuaState>, E: Push<LuaState>, F: Push<LuaState>, G: Push<LuaState>, H: Push<LuaState>, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, D, E, F, G, H, I, J, K, L, M> PushOne<LU> for AsTable<(D, E, F, G, H, I, J, K, L, M)>where LU: AsLua, D: Push<LuaState>, E: Push<LuaState>, F: Push<LuaState>, G: Push<LuaState>, H: Push<LuaState>, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, E, F, G, H, I, J, K, L, M> PushOne<LU> for AsTable<(E, F, G, H, I, J, K, L, M)>where LU: AsLua, E: Push<LuaState>, F: Push<LuaState>, G: Push<LuaState>, H: Push<LuaState>, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, F, G, H, I, J, K, L, M> PushOne<LU> for AsTable<(F, G, H, I, J, K, L, M)>where LU: AsLua, F: Push<LuaState>, G: Push<LuaState>, H: Push<LuaState>, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, G, H, I, J, K, L, M> PushOne<LU> for AsTable<(G, H, I, J, K, L, M)>where LU: AsLua, G: Push<LuaState>, H: Push<LuaState>, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, H, I, J, K, L, M> PushOne<LU> for AsTable<(H, I, J, K, L, M)>where LU: AsLua, H: Push<LuaState>, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, I, J, K, L, M> PushOne<LU> for AsTable<(I, J, K, L, M)>where LU: AsLua, I: Push<LuaState>, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, J, K, L, M> PushOne<LU> for AsTable<(J, K, L, M)>where LU: AsLua, J: Push<LuaState>, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, K, L, M> PushOne<LU> for AsTable<(K, L, M)>where LU: AsLua, K: Push<LuaState>, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, L, M> PushOne<LU> for AsTable<(L, M)>where LU: AsLua, L: Push<LuaState>, M: Push<LuaState>,

source§

impl<LU, M> PushOne<LU> for AsTable<(M,)>where LU: AsLua, M: PushOne<LuaState>,