Struct aw::lua_tables::LuaTable [−][src]
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]
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)>;
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]
R: LuaRead,
I: LuaPush,
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]
I: LuaPush,
V: LuaPush,
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]
&mut self,
index: I,
func: extern "C" fn(_: *mut lua_State) -> c_int
) where
I: LuaPush,
Inserts or modifies an elements of the table.
pub fn empty_table<I>(&mut self, index: I) -> LuaTable where
I: LuaPush + Clone,
[src]
I: LuaPush + Clone,
pub fn table_len(&mut self) -> usize
[src]
pub fn get_or_create_metatable(&mut self) -> LuaTable
[src]
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,