Struct tlua::AsTable

source ·
pub struct AsTable<T>(pub T);
Expand description

A wrapper type for pushing and reading rust tuples as lua tables.

Useful when working heterogeneous lua tables.

use tlua::{Lua, AsTable, AnyLuaValue::{LuaNumber, LuaString, LuaBoolean}};

let lua = Lua::new();
lua.checked_set("x", AsTable((true, "two", 3))).unwrap();

assert_eq!(
    lua.get("x"),
    Some([LuaBoolean(true), LuaString("two".into()), LuaNumber(3.0)]),
);
assert_eq!(lua.get("x"), Some(AsTable((true, "two".to_string(), 3))));

Tuple Fields§

§0: T

Trait Implementations§

source§

impl<T: Clone> Clone for AsTable<T>

source§

fn clone(&self) -> AsTable<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for AsTable<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<LU, A, B, C, D, E, F, G, H, I, J, K, L, M> LuaRead<LU> for AsTable<(A, B, C, D, E, F, G, H, I, J, K, L, M)>where LU: AsLua, A: for<'a> LuaRead<PushGuard<&'a LU>>, B: for<'a> LuaRead<PushGuard<&'a LU>>, C: for<'a> LuaRead<PushGuard<&'a LU>>, D: for<'a> LuaRead<PushGuard<&'a LU>>, E: for<'a> LuaRead<PushGuard<&'a LU>>, F: for<'a> LuaRead<PushGuard<&'a LU>>, G: for<'a> LuaRead<PushGuard<&'a LU>>, H: for<'a> LuaRead<PushGuard<&'a LU>>, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, B, C, D, E, F, G, H, I, J, K, L, M> LuaRead<LU> for AsTable<(B, C, D, E, F, G, H, I, J, K, L, M)>where LU: AsLua, B: for<'a> LuaRead<PushGuard<&'a LU>>, C: for<'a> LuaRead<PushGuard<&'a LU>>, D: for<'a> LuaRead<PushGuard<&'a LU>>, E: for<'a> LuaRead<PushGuard<&'a LU>>, F: for<'a> LuaRead<PushGuard<&'a LU>>, G: for<'a> LuaRead<PushGuard<&'a LU>>, H: for<'a> LuaRead<PushGuard<&'a LU>>, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, C, D, E, F, G, H, I, J, K, L, M> LuaRead<LU> for AsTable<(C, D, E, F, G, H, I, J, K, L, M)>where LU: AsLua, C: for<'a> LuaRead<PushGuard<&'a LU>>, D: for<'a> LuaRead<PushGuard<&'a LU>>, E: for<'a> LuaRead<PushGuard<&'a LU>>, F: for<'a> LuaRead<PushGuard<&'a LU>>, G: for<'a> LuaRead<PushGuard<&'a LU>>, H: for<'a> LuaRead<PushGuard<&'a LU>>, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, D, E, F, G, H, I, J, K, L, M> LuaRead<LU> for AsTable<(D, E, F, G, H, I, J, K, L, M)>where LU: AsLua, D: for<'a> LuaRead<PushGuard<&'a LU>>, E: for<'a> LuaRead<PushGuard<&'a LU>>, F: for<'a> LuaRead<PushGuard<&'a LU>>, G: for<'a> LuaRead<PushGuard<&'a LU>>, H: for<'a> LuaRead<PushGuard<&'a LU>>, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, E, F, G, H, I, J, K, L, M> LuaRead<LU> for AsTable<(E, F, G, H, I, J, K, L, M)>where LU: AsLua, E: for<'a> LuaRead<PushGuard<&'a LU>>, F: for<'a> LuaRead<PushGuard<&'a LU>>, G: for<'a> LuaRead<PushGuard<&'a LU>>, H: for<'a> LuaRead<PushGuard<&'a LU>>, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, F, G, H, I, J, K, L, M> LuaRead<LU> for AsTable<(F, G, H, I, J, K, L, M)>where LU: AsLua, F: for<'a> LuaRead<PushGuard<&'a LU>>, G: for<'a> LuaRead<PushGuard<&'a LU>>, H: for<'a> LuaRead<PushGuard<&'a LU>>, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, G, H, I, J, K, L, M> LuaRead<LU> for AsTable<(G, H, I, J, K, L, M)>where LU: AsLua, G: for<'a> LuaRead<PushGuard<&'a LU>>, H: for<'a> LuaRead<PushGuard<&'a LU>>, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, H, I, J, K, L, M> LuaRead<LU> for AsTable<(H, I, J, K, L, M)>where LU: AsLua, H: for<'a> LuaRead<PushGuard<&'a LU>>, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, I, J, K, L, M> LuaRead<LU> for AsTable<(I, J, K, L, M)>where LU: AsLua, I: for<'a> LuaRead<PushGuard<&'a LU>>, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, J, K, L, M> LuaRead<LU> for AsTable<(J, K, L, M)>where LU: AsLua, J: for<'a> LuaRead<PushGuard<&'a LU>>, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, K, L, M> LuaRead<LU> for AsTable<(K, L, M)>where LU: AsLua, K: for<'a> LuaRead<PushGuard<&'a LU>>, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, L, M> LuaRead<LU> for AsTable<(L, M)>where LU: AsLua, L: for<'a> LuaRead<PushGuard<&'a LU>>, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<LU, M> LuaRead<LU> for AsTable<(M,)>where LU: AsLua, M: for<'a> LuaRead<PushGuard<&'a LU>>,

source§

fn lua_read_at_position(lua: LU, index: NonZeroI32) -> ReadResult<Self, LU>

Reads the data from Lua at a given position.
source§

fn n_values_expected() -> i32

source§

fn lua_read(lua: L) -> ReadResult<Self, L>

Reads the data from Lua.
source§

fn lua_read_at_maybe_zero_position(lua: L, index: i32) -> ReadResult<Self, L>where L: AsLua,

source§

impl<T: Ord> Ord for AsTable<T>

source§

fn cmp(&self, other: &AsTable<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl<T: PartialEq> PartialEq<AsTable<T>> for AsTable<T>

source§

fn eq(&self, other: &AsTable<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd> PartialOrd<AsTable<T>> for AsTable<T>

source§

fn partial_cmp(&self, other: &AsTable<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<LU, A, B, C, D, E, F, G, H, I, J, K, L, M> Push<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>,

§

type Err = AsTablePushError<TuplePushError<<A as Push<*mut lua_State>>::Err, <(B, C, D, E, F, G, H, I, J, K, L, M) as Push<*mut lua_State>>::Err>>

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

impl<LU, B, C, D, E, F, G, H, I, J, K, L, M> Push<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>,

§

type Err = AsTablePushError<TuplePushError<<B as Push<*mut lua_State>>::Err, <(C, D, E, F, G, H, I, J, K, L, M) as Push<*mut lua_State>>::Err>>

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

impl<LU, C, D, E, F, G, H, I, J, K, L, M> Push<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>,

§

type Err = AsTablePushError<TuplePushError<<C as Push<*mut lua_State>>::Err, <(D, E, F, G, H, I, J, K, L, M) as Push<*mut lua_State>>::Err>>

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

impl<LU, D, E, F, G, H, I, J, K, L, M> Push<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>,

§

type Err = AsTablePushError<TuplePushError<<D as Push<*mut lua_State>>::Err, <(E, F, G, H, I, J, K, L, M) as Push<*mut lua_State>>::Err>>

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

impl<LU, E, F, G, H, I, J, K, L, M> Push<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>,

§

type Err = AsTablePushError<TuplePushError<<E as Push<*mut lua_State>>::Err, <(F, G, H, I, J, K, L, M) as Push<*mut lua_State>>::Err>>

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

impl<LU, F, G, H, I, J, K, L, M> Push<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>,

§

type Err = AsTablePushError<TuplePushError<<F as Push<*mut lua_State>>::Err, <(G, H, I, J, K, L, M) as Push<*mut lua_State>>::Err>>

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

impl<LU, G, H, I, J, K, L, M> Push<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>,

§

type Err = AsTablePushError<TuplePushError<<G as Push<*mut lua_State>>::Err, <(H, I, J, K, L, M) as Push<*mut lua_State>>::Err>>

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

impl<LU, H, I, J, K, L, M> Push<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>,

§

type Err = AsTablePushError<TuplePushError<<H as Push<*mut lua_State>>::Err, <(I, J, K, L, M) as Push<*mut lua_State>>::Err>>

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

impl<LU, I, J, K, L, M> Push<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>,

§

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

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

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

§

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

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

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

§

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

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

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

§

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

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
source§

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

§

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

Error that can happen when pushing a value.
source§

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

Pushes the value on the top of the stack. Read more
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)>where LU: AsLua, A: PushInto<LuaState>, B: PushInto<LuaState>, C: PushInto<LuaState>, D: PushInto<LuaState>, E: PushInto<LuaState>, F: PushInto<LuaState>, G: PushInto<LuaState>, H: PushInto<LuaState>, I: PushInto<LuaState>, J: PushInto<LuaState>, K: PushInto<LuaState>, L: PushInto<LuaState>, M: PushInto<LuaState>,

§

type Err = AsTablePushError<TuplePushError<<A as PushInto<*mut lua_State>>::Err, <(B, C, D, E, F, G, H, I, J, K, L, M) as PushInto<*mut lua_State>>::Err>>

source§

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

Push the value into lua by value
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)>where LU: AsLua, B: PushInto<LuaState>, C: PushInto<LuaState>, D: PushInto<LuaState>, E: PushInto<LuaState>, F: PushInto<LuaState>, G: PushInto<LuaState>, H: PushInto<LuaState>, I: PushInto<LuaState>, J: PushInto<LuaState>, K: PushInto<LuaState>, L: PushInto<LuaState>, M: PushInto<LuaState>,

§

type Err = AsTablePushError<TuplePushError<<B as PushInto<*mut lua_State>>::Err, <(C, D, E, F, G, H, I, J, K, L, M) as PushInto<*mut lua_State>>::Err>>

source§

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

Push the value into lua by value
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)>where LU: AsLua, C: PushInto<LuaState>, D: PushInto<LuaState>, E: PushInto<LuaState>, F: PushInto<LuaState>, G: PushInto<LuaState>, H: PushInto<LuaState>, I: PushInto<LuaState>, J: PushInto<LuaState>, K: PushInto<LuaState>, L: PushInto<LuaState>, M: PushInto<LuaState>,

§

type Err = AsTablePushError<TuplePushError<<C as PushInto<*mut lua_State>>::Err, <(D, E, F, G, H, I, J, K, L, M) as PushInto<*mut lua_State>>::Err>>

source§

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

Push the value into lua by value
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)>where LU: AsLua, D: PushInto<LuaState>, E: PushInto<LuaState>, F: PushInto<LuaState>, G: PushInto<LuaState>, H: PushInto<LuaState>, I: PushInto<LuaState>, J: PushInto<LuaState>, K: PushInto<LuaState>, L: PushInto<LuaState>, M: PushInto<LuaState>,

§

type Err = AsTablePushError<TuplePushError<<D as PushInto<*mut lua_State>>::Err, <(E, F, G, H, I, J, K, L, M) as PushInto<*mut lua_State>>::Err>>

source§

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

Push the value into lua by value
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)>where LU: AsLua, E: PushInto<LuaState>, F: PushInto<LuaState>, G: PushInto<LuaState>, H: PushInto<LuaState>, I: PushInto<LuaState>, J: PushInto<LuaState>, K: PushInto<LuaState>, L: PushInto<LuaState>, M: PushInto<LuaState>,

§

type Err = AsTablePushError<TuplePushError<<E as PushInto<*mut lua_State>>::Err, <(F, G, H, I, J, K, L, M) as PushInto<*mut lua_State>>::Err>>

source§

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

Push the value into lua by value
source§

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

§

type Err = AsTablePushError<TuplePushError<<F as PushInto<*mut lua_State>>::Err, <(G, H, I, J, K, L, M) as PushInto<*mut lua_State>>::Err>>

source§

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

Push the value into lua by value
source§

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

§

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

source§

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

Push the value into lua by value
source§

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

§

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

source§

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

Push the value into lua by value
source§

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

§

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

source§

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

Push the value into lua by value
source§

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

§

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

source§

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

Push the value into lua by value
source§

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

§

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

source§

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

Push the value into lua by value
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§

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

Push the value into lua by value
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>>

source§

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

Push the value into lua by value
source§

impl<T: Eq> Eq for AsTable<T>

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>,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T> StructuralEq for AsTable<T>

source§

impl<T> StructuralPartialEq for AsTable<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for AsTable<T>where T: RefUnwindSafe,

§

impl<T> Send for AsTable<T>where T: Send,

§

impl<T> Sync for AsTable<T>where T: Sync,

§

impl<T> Unpin for AsTable<T>where T: Unpin,

§

impl<T> UnwindSafe for AsTable<T>where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.