pub trait ThreadState: Sealed + RawHandle<Raw = RawLuaState> {
Show 30 methods
// Required methods
unsafe fn from_raw(raw: NonNull<RawLuaState>) -> Self
where Self: Sized;
unsafe fn current_call_info_cursor(&self) -> CallInfoCursor;
unsafe fn base_call_info_cursor(&self) -> CallInfoCursor;
unsafe fn set_current_call_info(&self, call_info: CallInfoCursor);
unsafe fn stack(&self) -> TValueCursor;
unsafe fn stack_base(&self) -> TValueCursor;
unsafe fn stack_top(&self) -> TValueCursor;
unsafe fn stack_last(&self) -> TValueCursor;
unsafe fn set_stack(&self, stack: TValueCursor);
unsafe fn set_stack_base(&self, base: TValueCursor);
unsafe fn set_stack_top(&self, top: TValueCursor);
unsafe fn open_upvalue(&self) -> Option<UpVal>;
unsafe fn set_open_upvalue(&self, upvalue: Option<UpVal>);
unsafe fn gc_list(&self) -> Option<GcObject>;
unsafe fn set_gc_list(&self, gc_list: Option<GcObject>);
unsafe fn name_call(&self) -> Option<TString>;
unsafe fn set_name_call(&self, name_call: Option<TString>);
unsafe fn cached_slot(&self) -> i32;
unsafe fn set_cached_slot(&self, cached_slot: i32);
unsafe fn globals(&self) -> Table;
unsafe fn set_globals(&self, globals: Table);
unsafe fn increment_native_call_depth(&self);
unsafe fn decrement_native_call_depth(&self);
unsafe fn increment_base_native_call_depth(&self);
unsafe fn decrement_base_native_call_depth(&self);
// Provided methods
unsafe fn current_call_info(&self) -> CallInfo { ... }
unsafe fn base_call_info(&self) -> CallInfo { ... }
unsafe fn restore_call_frame(
&self,
call_info: CallInfoCursor,
top: TValueCursor,
) { ... }
unsafe fn current_function(&self) -> Closure { ... }
unsafe fn current_env(&self) -> Table { ... }
}Expand description
Unstable access to a thread’s raw execution state.
§Safety
The thread and owning VM must be live. Returned handles, pointers, record views, and cursors are non-owning and are invalidated by their documented stack, call-frame, GC, close, reset, or destruction transitions.
Required Methods§
unsafe fn from_raw(raw: NonNull<RawLuaState>) -> Selfwhere
Self: Sized,
unsafe fn current_call_info_cursor(&self) -> CallInfoCursor
unsafe fn base_call_info_cursor(&self) -> CallInfoCursor
unsafe fn set_current_call_info(&self, call_info: CallInfoCursor)
unsafe fn stack(&self) -> TValueCursor
unsafe fn stack_base(&self) -> TValueCursor
unsafe fn stack_top(&self) -> TValueCursor
unsafe fn stack_last(&self) -> TValueCursor
unsafe fn set_stack(&self, stack: TValueCursor)
unsafe fn set_stack_base(&self, base: TValueCursor)
unsafe fn set_stack_top(&self, top: TValueCursor)
unsafe fn open_upvalue(&self) -> Option<UpVal>
unsafe fn set_open_upvalue(&self, upvalue: Option<UpVal>)
unsafe fn gc_list(&self) -> Option<GcObject>
unsafe fn set_gc_list(&self, gc_list: Option<GcObject>)
unsafe fn name_call(&self) -> Option<TString>
unsafe fn set_name_call(&self, name_call: Option<TString>)
unsafe fn cached_slot(&self) -> i32
unsafe fn set_cached_slot(&self, cached_slot: i32)
unsafe fn globals(&self) -> Table
unsafe fn set_globals(&self, globals: Table)
unsafe fn increment_native_call_depth(&self)
unsafe fn decrement_native_call_depth(&self)
unsafe fn increment_base_native_call_depth(&self)
unsafe fn decrement_base_native_call_depth(&self)
Provided Methods§
unsafe fn current_call_info(&self) -> CallInfo
unsafe fn base_call_info(&self) -> CallInfo
unsafe fn restore_call_frame( &self, call_info: CallInfoCursor, top: TValueCursor, )
unsafe fn current_function(&self) -> Closure
unsafe fn current_env(&self) -> Table
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".