Trait hlua::PushOne

source ·
pub trait PushOne<L>: 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<'a, 'lua, L, T, E> PushOne<L> for &'a [T]
where L: AsMutLua<'lua>, T: Clone + for<'b> Push<&'b mut L, Err = E>,

source§

impl<'a, T, E, P> PushOne<&'a mut InsideCallback> for Result<T, E>
where T: PushOne<&'a mut InsideCallback, Err = P> + for<'b> PushOne<&'b mut &'a mut InsideCallback, Err = P>, E: Display,

source§

impl<'lua, 's, L> PushOne<L> for &'s str
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for bool
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for f32
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for f64
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for i8
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for i16
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for i32
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for u8
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for u16
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for u32
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for String
where L: AsMutLua<'lua>,

source§

impl<'lua, L, K, E> PushOne<L> for HashSet<K>
where L: AsMutLua<'lua>, K: for<'a, 'b> PushOne<&'a mut &'b mut L, Err = E> + Eq + Hash,

source§

impl<'lua, L, K, V, E> PushOne<L> for HashMap<K, V>
where L: AsMutLua<'lua>, K: for<'a, 'b> PushOne<&'a mut &'b mut L, Err = E> + Eq + Hash, V: for<'a, 'b> PushOne<&'a mut &'b mut L, Err = E>,

source§

impl<'lua, L, T, E> PushOne<L> for Option<T>
where T: PushOne<L, Err = E>, L: AsMutLua<'lua>,

source§

impl<'lua, L, T, E> PushOne<L> for Vec<T>
where L: AsMutLua<'lua>, T: for<'a> Push<&'a mut L, Err = E>,

source§

impl<'lua, LU, M> PushOne<LU> for (M,)
where LU: AsMutLua<'lua>, M: PushOne<LU>,

Implementors§

source§

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

source§

impl<'lua, L> PushOne<L> for AnyHashableLuaValue
where L: AsMutLua<'lua>,

source§

impl<'lua, L> PushOne<L> for AnyLuaValue
where L: AsMutLua<'lua>,

source§

impl<'lua, L, R> PushOne<L> for LuaCodeFromReader<R>
where L: AsMutLua<'lua>, R: Read,

source§

impl<'lua, L, Z, R> PushOne<L> for Function<Z, (), R>
where L: AsMutLua<'lua>, Z: 'lua + FnMut() -> R, R: for<'a> Push<&'a mut InsideCallback> + 'static,

source§

impl<'lua, L, Z, R, A: 'static> PushOne<L> for Function<Z, (A,), R>
where L: AsMutLua<'lua>, Z: 'lua + FnMut(A) -> R, (A,): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static> PushOne<L> for Function<Z, (A, B), R>
where L: AsMutLua<'lua>, Z: 'lua + FnMut(A, B) -> R, (A, B): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static, C: 'static> PushOne<L> for Function<Z, (A, B, C), R>
where L: AsMutLua<'lua>, Z: 'lua + FnMut(A, B, C) -> R, (A, B, C): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static> PushOne<L> for Function<Z, (A, B, C, D), R>
where L: AsMutLua<'lua>, Z: 'lua + FnMut(A, B, C, D) -> R, (A, B, C, D): for<'p> LuaRead<&'p mut InsideCallback>, R: for<'a> Push<&'a mut InsideCallback> + 'static,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> PushOne<L> for Function<Z, (A, B, C, D, E), R>
where L: AsMutLua<'lua>, Z: 'lua + 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,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> PushOne<L> for Function<Z, (A, B, C, D, E, F), R>
where L: AsMutLua<'lua>, Z: 'lua + 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,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static> PushOne<L> for Function<Z, (A, B, C, D, E, F, G), R>
where L: AsMutLua<'lua>, Z: 'lua + 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,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static> PushOne<L> for Function<Z, (A, B, C, D, E, F, G, H), R>
where L: AsMutLua<'lua>, Z: 'lua + 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,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static> PushOne<L> for Function<Z, (A, B, C, D, E, F, G, H, I), R>
where L: AsMutLua<'lua>, Z: 'lua + 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,

source§

impl<'lua, L, Z, R, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static> PushOne<L> for Function<Z, (A, B, C, D, E, F, G, H, I, J), R>
where L: AsMutLua<'lua>, Z: 'lua + 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,