Skip to main content

VmCallFrame

Trait VmCallFrame 

Source
pub trait VmCallFrame: Sealed {
    // Required methods
    unsafe fn try_func_tm(&self, function: TValueCursor) -> VmResult;
    unsafe fn pre_call(
        &self,
        function: TValueCursor,
        n_results: i32,
    ) -> VmResult<PreCallResult>;
    unsafe fn pos_call(&self, first: TValueCursor);
    unsafe fn call_hook<F>(&self, hook: F, userdata: *mut ()) -> VmResult
       where F: FnOnce(&Thread, &mut LuaDebug) -> VmResult;
}
Expand description

Unstable VM call-frame entry and exit capability.

§Safety

Function cursors and call frames must be live positions in this thread, with the required argument/result stack shape. Execution may relocate the stack, collect objects, invoke callbacks, yield, or perform VM control flow.

Required Methods§

Source

unsafe fn try_func_tm(&self, function: TValueCursor) -> VmResult

luaV_tryfuncTM

Source

unsafe fn pre_call( &self, function: TValueCursor, n_results: i32, ) -> VmResult<PreCallResult>

luau_precall

Source

unsafe fn pos_call(&self, first: TValueCursor)

luau_poscall

Source

unsafe fn call_hook<F>(&self, hook: F, userdata: *mut ()) -> VmResult
where F: FnOnce(&Thread, &mut LuaDebug) -> VmResult,

luau_callhook

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§