[][src]Struct pm_rlua::lua_tables::LuaTable

pub struct LuaTable { /* fields omitted */ }

Represents a table stored in the Lua context.

Loading this type mutably borrows the Lua context.

Implementations

impl LuaTable[src]

pub fn into_inner(self) -> *mut lua_State[src]

Destroys the LuaTable and returns its inner Lua context. Useful when it takes Lua by value.

pub fn iter<K, V>(&mut self) -> LuaTableIterator<'_, K, V>

Notable traits for LuaTableIterator<'t, K, V>

impl<'t, K, V> Iterator for LuaTableIterator<'t, K, V> where
    K: LuaRead + 'static,
    V: LuaRead + 'static, 
type Item = Option<(K, V)>;
[src]

Iterates over the elements inside the table.

pub fn query<'a, R, I>(&'a mut self, index: I) -> Option<R> where
    R: LuaRead,
    I: LuaPush
[src]

Loads a value in the table given its index.

pub fn set<I, V>(&mut self, index: I, value: V) where
    I: LuaPush,
    V: LuaPush
[src]

Inserts or modifies an elements of the table.

pub fn register<I>(
    &mut self,
    index: I,
    func: extern "C" fn(_: *mut lua_State) -> c_int
) where
    I: LuaPush
[src]

Inserts or modifies an elements of the table.

pub fn empty_table<I>(&mut self, index: I) -> LuaTable where
    I: LuaPush + Clone
[src]

pub fn table_len(&mut self) -> usize[src]

pub fn get_or_create_metatable(&mut self) -> LuaTable[src]

Trait Implementations

impl Drop for LuaTable[src]

impl LuaRead for LuaTable[src]

Auto Trait Implementations

impl RefUnwindSafe for LuaTable

impl !Send for LuaTable

impl !Sync for LuaTable

impl Unpin for LuaTable

impl UnwindSafe for LuaTable

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.