Skip to main content

DebugRuntime

Trait DebugRuntime 

Source
pub trait DebugRuntime: Sealed {
Show 15 methods // Required methods unsafe fn type_error<T>( &self, object: TValue, operation: &str, ) -> VmErrorResult<T>; unsafe fn for_error<T>( &self, object: TValue, what: &str, ) -> VmErrorResult<T>; unsafe fn concat_error<T>( &self, left: TValue, right: TValue, ) -> VmErrorResult<T>; unsafe fn arith_error<T>( &self, left: TValue, right: TValue, operation: TmEvent, ) -> VmErrorResult<T>; unsafe fn order_error<T>( &self, left: TValue, right: TValue, operation: TmEvent, ) -> VmErrorResult<T>; unsafe fn index_error<T>( &self, object: TValue, key: TValue, ) -> VmErrorResult<T>; unsafe fn method_error<T>( &self, object: TValue, key: TString, ) -> VmErrorResult<T>; unsafe fn missing_member_error<T>( &self, object: TValue, key: TValue, ) -> VmErrorResult<T>; unsafe fn readonly_error<T>(&self) -> VmErrorResult<T>; unsafe fn run_error<'a, T, F, A>( &self, format: F, args: A, ) -> VmErrorResult<T> where F: AsRef<[u8]>, A: AsMut<[Arg<'a>]>; unsafe fn push_error(&self, error: &BStr) -> VmErrorResult; unsafe fn breakpoint_internal( &self, proto: Proto, line: i32, enable: bool, ) -> VmErrorResult; unsafe fn on_break(&self) -> bool; unsafe fn is_native(&self, level: i32) -> i32; unsafe fn has_native(&self, level: i32) -> i32;
}
Expand description

Unstable debug and runtime-error capability.

§Safety

Values, call frames, protos, and string handles must be live records from this thread’s VM. Callers must maintain the current stack/call-frame shape and allow error operations to perform non-local VM control flow.

Required Methods§

Source

unsafe fn type_error<T>( &self, object: TValue, operation: &str, ) -> VmErrorResult<T>

luaG_typeerror

Source

unsafe fn for_error<T>(&self, object: TValue, what: &str) -> VmErrorResult<T>

luaG_forerror

Source

unsafe fn concat_error<T>( &self, left: TValue, right: TValue, ) -> VmErrorResult<T>

luaG_concaterror

Source

unsafe fn arith_error<T>( &self, left: TValue, right: TValue, operation: TmEvent, ) -> VmErrorResult<T>

luaG_aritherror

Source

unsafe fn order_error<T>( &self, left: TValue, right: TValue, operation: TmEvent, ) -> VmErrorResult<T>

luaG_ordererror

Source

unsafe fn index_error<T>(&self, object: TValue, key: TValue) -> VmErrorResult<T>

luaG_indexerror

Source

unsafe fn method_error<T>( &self, object: TValue, key: TString, ) -> VmErrorResult<T>

luaG_methoderror

Source

unsafe fn missing_member_error<T>( &self, object: TValue, key: TValue, ) -> VmErrorResult<T>

luaG_missingmembererror

Source

unsafe fn readonly_error<T>(&self) -> VmErrorResult<T>

luaG_readonlyerror

Source

unsafe fn run_error<'a, T, F, A>(&self, format: F, args: A) -> VmErrorResult<T>
where F: AsRef<[u8]>, A: AsMut<[Arg<'a>]>,

luaG_runerror

Source

unsafe fn push_error(&self, error: &BStr) -> VmErrorResult

luaG_pusherror

Source

unsafe fn breakpoint_internal( &self, proto: Proto, line: i32, enable: bool, ) -> VmErrorResult

luaG_breakpoint

Source

unsafe fn on_break(&self) -> bool

luaG_onbreak

Source

unsafe fn is_native(&self, level: i32) -> i32

luaG_isnative

Source

unsafe fn has_native(&self, level: i32) -> i32

luaG_hasnative

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§