pub struct LuaTable { /* private fields */ }Expand description
Type for Lua table.
Implementations§
Source§impl LuaTable
impl LuaTable
pub fn with_capacity(capacity: usize) -> Self
pub fn new() -> Self
pub fn get_metavalue(&self, key: &'static str) -> Option<LuaValue>
Sourcepub fn get(&self, key: &LuaValue) -> Option<&LuaValue>
pub fn get(&self, key: &LuaValue) -> Option<&LuaValue>
get value from table. key can be any lua value.
Sourcepub fn get_mut(&mut self, key: &LuaValue) -> Option<&mut LuaValue>
pub fn get_mut(&mut self, key: &LuaValue) -> Option<&mut LuaValue>
get value from table. key can be any lua value.
Sourcepub fn get_arr_mut(&mut self, key: IntType) -> Option<&mut LuaValue>
pub fn get_arr_mut(&mut self, key: IntType) -> Option<&mut LuaValue>
get value from array part of table.
Sourcepub fn get_table(&self, key: &LuaValue) -> Option<&LuaValue>
pub fn get_table(&self, key: &LuaValue) -> Option<&LuaValue>
get value from hash part of table.
Sourcepub fn get_table_mut(&mut self, key: &LuaValue) -> Option<&mut LuaValue>
pub fn get_table_mut(&mut self, key: &LuaValue) -> Option<&mut LuaValue>
get value from hash part of table.
Sourcepub fn insert(&mut self, key: LuaValue, value: LuaValue) -> Option<LuaValue>
pub fn insert(&mut self, key: LuaValue, value: LuaValue) -> Option<LuaValue>
insert value to table. key can be any lua value.
Sourcepub fn insert_arr(&mut self, key: IntType, value: LuaValue) -> Option<LuaValue>
pub fn insert_arr(&mut self, key: IntType, value: LuaValue) -> Option<LuaValue>
insert value to array part of table.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LuaTable
impl !RefUnwindSafe for LuaTable
impl !Send for LuaTable
impl !Sync for LuaTable
impl Unpin for LuaTable
impl !UnwindSafe for LuaTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more