Skip to main content

Module state_stub

Module state_stub 

Source
Expand description

Compatibility shim: re-exports the canonical LuaState from lua-vm and provides an extension trait holding every method the stdlib’s original translation called on an earlier stub LuaState.

Every extension-trait method body is todo!("phase-b-reconcile: <name>") and is not meant to run: where a trait method’s name collides with an inherent method on the canonical LuaState, Rust resolves to the inherent method, so the trait only supplies whichever methods the canonical type is still missing. Call sites whose shape no longer matches the inherent signature (e.g. state.push(...)? against the canonical pub fn push(&mut self, val: LuaValue)) are patched directly at the call site instead.

Structs§

LuaDebug
Debug introspection record. C: lua_Debug.
LuaState
Per-thread Lua execution state.

Enums§

CompareOp
Comparison operations (eq, lt, le). C: LUA_OP*.

Traits§

LuaStateStubExt
Extension trait wiring every stdlib-stub method onto the canonical LuaState. Bodies are todo!("phase-b-reconcile: …") and unreachable in practice: when the canonical type already defines a method with the same name, Rust’s inherent-first resolution makes this trait method unreachable (the inherent one wins) — the trait is then only providing the missing methods. Conflicting call-sites whose shape no longer matches the inherent signature are patched in their respective stdlib modules.

Functions§

upvalue_index
Pseudo-index for the i-th upvalue of a C function.

Type Aliases§

LuaReader
Reader-callback type for lua_load. C: lua_Reader.
LuaWriter
Writer-callback type for lua_dump. C: lua_Writer.
lua_CFunction
Bare function callable from Lua. C: lua_CFunction.