Skip to main content

ThreadState

Trait ThreadState 

Source
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§

Source

unsafe fn from_raw(raw: NonNull<RawLuaState>) -> Self
where Self: Sized,

Source

unsafe fn current_call_info_cursor(&self) -> CallInfoCursor

Source

unsafe fn base_call_info_cursor(&self) -> CallInfoCursor

Source

unsafe fn set_current_call_info(&self, call_info: CallInfoCursor)

Source

unsafe fn stack(&self) -> TValueCursor

Source

unsafe fn stack_base(&self) -> TValueCursor

Source

unsafe fn stack_top(&self) -> TValueCursor

Source

unsafe fn stack_last(&self) -> TValueCursor

Source

unsafe fn set_stack(&self, stack: TValueCursor)

Source

unsafe fn set_stack_base(&self, base: TValueCursor)

Source

unsafe fn set_stack_top(&self, top: TValueCursor)

Source

unsafe fn open_upvalue(&self) -> Option<UpVal>

Source

unsafe fn set_open_upvalue(&self, upvalue: Option<UpVal>)

Source

unsafe fn gc_list(&self) -> Option<GcObject>

Source

unsafe fn set_gc_list(&self, gc_list: Option<GcObject>)

Source

unsafe fn name_call(&self) -> Option<TString>

Source

unsafe fn set_name_call(&self, name_call: Option<TString>)

Source

unsafe fn cached_slot(&self) -> i32

Source

unsafe fn set_cached_slot(&self, cached_slot: i32)

Source

unsafe fn globals(&self) -> Table

Source

unsafe fn set_globals(&self, globals: Table)

Source

unsafe fn increment_native_call_depth(&self)

Source

unsafe fn decrement_native_call_depth(&self)

Source

unsafe fn increment_base_native_call_depth(&self)

Source

unsafe fn decrement_base_native_call_depth(&self)

Provided Methods§

Source

unsafe fn current_call_info(&self) -> CallInfo

Source

unsafe fn base_call_info(&self) -> CallInfo

Source

unsafe fn restore_call_frame( &self, call_info: CallInfoCursor, top: TValueCursor, )

Source

unsafe fn current_function(&self) -> Closure

Source

unsafe fn current_env(&self) -> Table

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§