Skip to main content

new_metatable

Function new_metatable 

Source
pub fn new_metatable(
    state: &mut LuaState,
    tname: &[u8],
) -> Result<bool, LuaError>
Expand description

Create a new metatable for type tname and register it in the registry. Returns true (and leaves new metatable on stack) if the table was created; returns false (and leaves existing table on stack) if already existed.