Skip to main content

RawStackAccess

Trait RawStackAccess 

Source
pub trait RawStackAccess: Sealed {
    // Required methods
    unsafe fn to_object(&self, index: i32) -> Option<TValue>;
    unsafe fn push_value_internal(&self, value: TValue) -> VmErrorResult;
    unsafe fn push_table(&self, table: Table) -> VmErrorResult;
    unsafe fn push_class(&self, class: Class) -> VmErrorResult;
}
Expand description

Unstable raw stack-address conversion capability.

§Safety

Indices must be valid for this thread under the corresponding Luau stack rule. Returned views and cursors borrow no storage and are invalidated by stack relocation, stack mutation, reset, close, or VM destruction.

Required Methods§

Source

unsafe fn to_object(&self, index: i32) -> Option<TValue>

luaA_toobject

Source

unsafe fn push_value_internal(&self, value: TValue) -> VmErrorResult

luaA_pushvalue

Source

unsafe fn push_table(&self, table: Table) -> VmErrorResult

Source

unsafe fn push_class(&self, class: Class) -> VmErrorResult

luaA_pushclass

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§