Struct td_rlua::lua_tables::LuaTable
[−]
[src]
pub struct LuaTable { // some 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 clear_top(&mut self)
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
Loads a value in the table given its index.
fn set<I, V>(&mut self, index: I, value: V) where I: LuaPush, V: LuaPush
Inserts or modifies an elements of the table.
fn register<I>(&mut self, index: I, func: extern 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
fn table_len(&mut self) -> usize
fn get_or_create_metatable(&mut self) -> LuaTable
Trait Implementations
impl LuaRead for LuaTable
[src]
fn lua_read_at_position(lua: *mut lua_State, index: 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.