Function with_state

Source
pub unsafe fn with_state<F, R>(fun: F) -> R
where F: FnOnce(*mut State) -> R,
Expand description

Executes a function with access to the Lua state.

NOTE: this will segfault if the Lua state has not been initialized by calling init.