Skip to main content

Module closure

Module closure 

Source
Expand description

LuaClosure — the function variant of LuaValue. Three sub-kinds: Lua closure (compiled Proto + upvalues), C closure (function pointer + upvalues), light C function (function pointer, no upvalues).

Structs§

LuaCClosure
LuaLClosure

Enums§

LuaClosure

Type Aliases§

LuaCFnPtr
Opaque registry index into GlobalState.c_functions, where the real lua_CFunction (fn(&mut LuaState) -> Result<usize, LuaError>) is stored. Lua-types can’t reference LuaState without a circular dep, so we keep the closure variant type-erased here and resolve through the registry at call time.