Struct td_rlua::lua_tables::LuaTable
[−]
[src]
pub struct LuaTable { /* fields omitted */ }
Represents a table stored in the Lua context.
Loading this type mutably borrows the Lua context.
Methods
impl LuaTable
[src]
fn into_inner(self) -> *mut lua_State
Destroys the LuaTable and returns its inner Lua context. Useful when it takes Lua by value.
fn iter<K, V>(&mut self) -> LuaTableIterator<K, V>
Iterates over the elements inside the table.
fn query<'a, R, I>(&'a mut self, index: I) -> Option<R> where
R: LuaRead,
I: LuaPush,
R: LuaRead,
I: LuaPush,
Loads a value in the table given its index.
fn set<I, V>(&mut self, index: I, value: V) where
I: LuaPush,
V: LuaPush,
I: LuaPush,
V: LuaPush,
Inserts or modifies an elements of the table.
fn register<I>(
&mut self,
index: I,
func: extern "C" fn(_: *mut lua_State) -> c_int
) where
I: LuaPush,
&mut self,
index: I,
func: extern "C" fn(_: *mut lua_State) -> c_int
) where
I: LuaPush,
Inserts or modifies an elements of the table.
fn empty_table<I>(&mut self, index: I) -> LuaTable where
I: LuaPush + Clone,
I: LuaPush + Clone,
fn table_len(&mut self) -> usize
fn get_or_create_metatable(&mut self) -> LuaTable
Trait Implementations
impl LuaRead for LuaTable
[src]
fn lua_read_with_pop(
lua: *mut lua_State,
index: i32,
pop: i32
) -> Option<LuaTable>
lua: *mut lua_State,
index: i32,
pop: i32
) -> Option<LuaTable>
Reads the data from Lua at a given position.
fn lua_read(lua: *mut lua_State) -> Option<Self>
Reads the data from Lua.
fn lua_read_at_position(lua: *mut lua_State, index: i32) -> Option<Self>
Reads the data from Lua at a given position.