pub trait TableRuntime: Sealed {
// Required methods
unsafe fn set_num(&self, table: Table, key: i32) -> VmErrorResult<TValue>;
unsafe fn set_str(
&self,
table: Table,
key: TString,
) -> VmErrorResult<LuaNodeCursor>;
unsafe fn setp(
&self,
table: Table,
key: *mut (),
tag: i32,
) -> VmErrorResult<TValue>;
unsafe fn set(&self, table: Table, key: TValue) -> VmErrorResult<TValue>;
unsafe fn set_slot(
&self,
table: Table,
slot: TValue,
key: TValue,
) -> VmErrorResult<TValue>;
unsafe fn new_key(&self, table: Table, key: TValue) -> VmErrorResult<TValue>;
unsafe fn next_internal(
&self,
table: Table,
key: TValueCursor,
) -> VmErrorResult<i32>;
unsafe fn new_table_internal(
&self,
n_array: i32,
n_hash: i32,
) -> VmErrorResult<Table>;
unsafe fn resize_array(&self, table: Table, n_array: i32) -> VmErrorResult;
unsafe fn resize_hash(&self, table: Table, n_hash: i32) -> VmErrorResult;
unsafe fn free_table(&self, table: Table, page: LuaPage);
unsafe fn clone_table_internal(&self, table: Table) -> VmErrorResult<Table>;
}Expand description
Unstable table allocation and mutation capability.
§Safety
Tables, keys, values, cursors, and pages must be live records from this thread’s VM. Stack cursors and storage indices must be in bounds, and all resize, hash, readonly, metatable, and GC barrier invariants must hold.
Required Methods§
unsafe fn set_num(&self, table: Table, key: i32) -> VmErrorResult<TValue>
unsafe fn set_str( &self, table: Table, key: TString, ) -> VmErrorResult<LuaNodeCursor>
unsafe fn setp( &self, table: Table, key: *mut (), tag: i32, ) -> VmErrorResult<TValue>
unsafe fn set(&self, table: Table, key: TValue) -> VmErrorResult<TValue>
unsafe fn set_slot( &self, table: Table, slot: TValue, key: TValue, ) -> VmErrorResult<TValue>
unsafe fn new_key(&self, table: Table, key: TValue) -> VmErrorResult<TValue>
unsafe fn next_internal( &self, table: Table, key: TValueCursor, ) -> VmErrorResult<i32>
unsafe fn new_table_internal( &self, n_array: i32, n_hash: i32, ) -> VmErrorResult<Table>
unsafe fn resize_array(&self, table: Table, n_array: i32) -> VmErrorResult
unsafe fn resize_hash(&self, table: Table, n_hash: i32) -> VmErrorResult
unsafe fn free_table(&self, table: Table, page: LuaPage)
unsafe fn clone_table_internal(&self, table: Table) -> VmErrorResult<Table>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".