Trait tlua::PushInto

source ·
pub trait PushInto<L>
where L: AsLua,
{ type Err; // Required method fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Self::Err, L)>; // Provided method fn push_into_no_err(self, lua: L) -> PushGuard<L> where Self: Sized, <Self as PushInto<L>>::Err: Into<Void> { ... } }
Expand description

Types implementing this trait can be pushed onto the Lua stack by value.

Required Associated Types§

Required Methods§

source

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Self::Err, L)>

Push the value into lua by value

Provided Methods§

source

fn push_into_no_err(self, lua: L) -> PushGuard<L>
where Self: Sized, <Self as PushInto<L>>::Err: Into<Void>,

Same as push_into_lua but can only succeed and is only available if Err implements Into<Void>.

Implementations on Foreign Types§

source§

impl<L> PushInto<L> for bool
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for f32
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for f64
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for i8
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for i16
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for i32
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for i64
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for isize
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for u8
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for u16
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for u32
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for u64
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

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

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for usize
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for CString
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

impl<L> PushInto<L> for String
where L: AsLua,

§

type Err = Void

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Void, L)>

source§

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

§

type Err = <K as PushInto<*mut lua_State>>::Err

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (K::Err, L)>

source§

impl<L, K, V> PushInto<L> for HashMap<K, V>

§

type Err = TuplePushError<<K as PushInto<*mut lua_State>>::Err, <V as PushInto<*mut lua_State>>::Err>

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Self::Err, L)>

source§

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

§

type Err = <T as PushInto<L>>::Err

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Self::Err, L)>

source§

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

§

type Err = PushIterError<<T as PushInto<*mut lua_State>>::Err>

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Self::Err, L)>

source§

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

§

type Err = PushIterError<<T as PushInto<*mut lua_State>>::Err>

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Self::Err, L)>

source§

impl<LU, A, B, C, D, E, F, G, H, I, J, K, L, M> PushInto<LU> for (A, B, C, D, E, F, G, H, I, J, K, L, M)

source§

impl<LU, B, C, D, E, F, G, H, I, J, K, L, M> PushInto<LU> for (B, C, D, E, F, G, H, I, J, K, L, M)

source§

impl<LU, C, D, E, F, G, H, I, J, K, L, M> PushInto<LU> for (C, D, E, F, G, H, I, J, K, L, M)

source§

impl<LU, D, E, F, G, H, I, J, K, L, M> PushInto<LU> for (D, E, F, G, H, I, J, K, L, M)

source§

impl<LU, E, F, G, H, I, J, K, L, M> PushInto<LU> for (E, F, G, H, I, J, K, L, M)

source§

impl<LU, F, G, H, I, J, K, L, M> PushInto<LU> for (F, G, H, I, J, K, L, M)

source§

impl<LU, G, H, I, J, K, L, M> PushInto<LU> for (G, H, I, J, K, L, M)

source§

impl<LU, H, I, J, K, L, M> PushInto<LU> for (H, I, J, K, L, M)

source§

impl<LU, I, J, K, L, M> PushInto<LU> for (I, J, K, L, M)

source§

impl<LU, J, K, L, M> PushInto<LU> for (J, K, L, M)

source§

impl<LU, K, L, M> PushInto<LU> for (K, L, M)

source§

impl<LU, L, M> PushInto<LU> for (L, M)
where LU: AsLua, L: PushInto<LuaState>, M: PushInto<LuaState>,

§

type Err = TuplePushError<<L as PushInto<*mut lua_State>>::Err, <(M,) as PushInto<*mut lua_State>>::Err>

source§

fn push_into_lua(self, lua: LU) -> Result<PushGuard<LU>, (Self::Err, LU)>

source§

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

§

type Err = TuplePushError<<M as PushInto<LU>>::Err, Void>

source§

fn push_into_lua(self, lua: LU) -> Result<PushGuard<LU>, (Self::Err, LU)>

source§

impl<T, E> PushInto<InsideCallback> for Result<T, Throw<E>>

source§

impl<T, E> PushInto<InsideCallback> for Result<T, E>

source§

impl<T, L> PushInto<L> for &T
where L: AsLua, T: ?Sized + Push<L>,

§

type Err = <T as Push<L>>::Err

source§

fn push_into_lua(self, lua: L) -> Result<PushGuard<L>, (Self::Err, L)>

Implementors§

source§

impl<L> PushInto<L> for AnyLuaString
where L: AsLua,

§

type Err = Void

source§

impl<L> PushInto<L> for False
where L: AsLua,

§

type Err = Void

source§

impl<L> PushInto<L> for Nil
where L: AsLua,

§

type Err = Void

source§

impl<L> PushInto<L> for Null
where L: AsLua,

§

type Err = Void

source§

impl<L> PushInto<L> for True
where L: AsLua,

§

type Err = Void

source§

impl<L, I> PushInto<L> for TableFromIter<I>
where L: AsLua, I: Iterator, <I as Iterator>::Item: PushInto<LuaState>,

source§

impl<L, K> PushInto<L> for Object<K>
where L: AsLua, K: AsLua,

§

type Err = Void

source§

impl<L, R> PushInto<L> for LuaCodeFromReader<R>
where L: AsLua, R: Read,

source§

impl<L, T> PushInto<L> for CData<T>
where L: AsLua, T: AsCData,

§

type Err = Void

source§

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

§

type Err = Void

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> PushInto<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 + 'static, (A, B, C, D, E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

§

type Err = Void

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> PushInto<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 + 'static, (B, C, D, E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

§

type Err = Void

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> PushInto<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 + 'static, (C, D, E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

§

type Err = Void

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> PushInto<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 + 'static, (D, E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

§

type Err = Void

source§

impl<L, Z, R, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushInto<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 + 'static, (E, F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

§

type Err = Void

source§

impl<L, Z, R, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushInto<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 + 'static, (F, G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

§

type Err = Void

source§

impl<L, Z, R, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, M: 'static, N: 'static> PushInto<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 + 'static, (G, H, I, J, K, M, N): for<'p> LuaRead<&'p InsideCallback>, R: PushInto<InsideCallback> + 'static,

§

type Err = Void

source§

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

§

type Err = Void

source§

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

§

type Err = Void

source§

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

§

type Err = Void

source§

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

§

type Err = Void

source§

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

§

type Err = Void

source§

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

§

type Err = Void

source§

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

§

type Err = Void

source§

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

§

type Err = Void

source§

impl<L: AsLua> PushInto<L> for CFunction

§

type Err = Void

source§

impl<LU, A, B, C, D, E, F, G, H, I, J, K, L, M> PushInto<LU> for AsTable<(A, B, C, D, E, F, G, H, I, J, K, L, M)>

source§

impl<LU, B, C, D, E, F, G, H, I, J, K, L, M> PushInto<LU> for AsTable<(B, C, D, E, F, G, H, I, J, K, L, M)>

source§

impl<LU, C, D, E, F, G, H, I, J, K, L, M> PushInto<LU> for AsTable<(C, D, E, F, G, H, I, J, K, L, M)>

source§

impl<LU, D, E, F, G, H, I, J, K, L, M> PushInto<LU> for AsTable<(D, E, F, G, H, I, J, K, L, M)>

source§

impl<LU, E, F, G, H, I, J, K, L, M> PushInto<LU> for AsTable<(E, F, G, H, I, J, K, L, M)>

source§

impl<LU, F, G, H, I, J, K, L, M> PushInto<LU> for AsTable<(F, G, H, I, J, K, L, M)>

source§

impl<LU, G, H, I, J, K, L, M> PushInto<LU> for AsTable<(G, H, I, J, K, L, M)>

source§

impl<LU, H, I, J, K, L, M> PushInto<LU> for AsTable<(H, I, J, K, L, M)>

source§

impl<LU, I, J, K, L, M> PushInto<LU> for AsTable<(I, J, K, L, M)>

source§

impl<LU, J, K, L, M> PushInto<LU> for AsTable<(J, K, L, M)>

source§

impl<LU, K, L, M> PushInto<LU> for AsTable<(K, L, M)>

§

type Err = AsTablePushError<TuplePushError<<K as PushInto<*mut lua_State>>::Err, <(L, M) as PushInto<*mut lua_State>>::Err>>

source§

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

§

type Err = AsTablePushError<TuplePushError<<L as PushInto<*mut lua_State>>::Err, <(M,) as PushInto<*mut lua_State>>::Err>>

source§

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

§

type Err = AsTablePushError<TuplePushError<<M as PushInto<*mut lua_State>>::Err, Void>>