Module dmsdk::lua

source ·
Expand description

Wrappers for the Lua C API.

Macros

Creates a new constant Reg with the name provided, to be used with register().
Raises an error with the given message.
Pushes a formatted string onto the stack.

Structs

Wrapper around a raw StatePtr.

Functions

Checks if there is a Lua string at i and converts it into a Vec<u8>.
Checks if there is a Lua number at i and converts it into an f64.
Checks if there is a Lua number at i and converts it into an isize.
Checks if there is a Lua string at i and converts it into a String.
Returns the number of elements in the stack.
Creates a new empty table and pushes it onto the stack.
Pops n elements from the stack.
Pushes an isize onto the stack.
Pushes a string slice onto the stack.
Pushes any Rust object onto the stack as userdata.
Sets the nth element of the table at i to the value on top of the stack.
Taken from the mond crate.
Returns true if the value at i is not false or nil.
Converts the data at i on the stack into an instance of type T.

Type Definitions

Alias for a Lua-compatible function.
Collection of Lua-compatible functions and their names.
Mutable pointer to a lua_State.