Struct td_rlua::Lua [] [src]

pub struct Lua { /* fields omitted */ }

Methods

impl Lua
[src]

Builds a new Lua context.

Panic

The function panics if the underlying call to luaL_newstate fails (which indicates lack of memory).

Takes an existing lua_State and build a Lua object from it.

Arguments

  • close_at_the_end: if true, lua_close will be called on the lua_State on the destructor

Opens all standard Lua libraries. This is done by calling luaL_openlibs.

Reads the value of a global variable.

Modifies the value of a global variable.

Inserts an empty table, then loads it.

enable hotfix, can update the new func, and the old data will be keep and bind to the new func

Trait Implementations

impl Drop for Lua
[src]

A method called when the value goes out of scope. Read more