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§
Sourceunsafe fn type_error<T>(
&self,
object: TValue,
operation: &str,
) -> VmErrorResult<T>
unsafe fn type_error<T>( &self, object: TValue, operation: &str, ) -> VmErrorResult<T>
luaG_typeerror
Sourceunsafe fn for_error<T>(&self, object: TValue, what: &str) -> VmErrorResult<T>
unsafe fn for_error<T>(&self, object: TValue, what: &str) -> VmErrorResult<T>
luaG_forerror
Sourceunsafe fn concat_error<T>(
&self,
left: TValue,
right: TValue,
) -> VmErrorResult<T>
unsafe fn concat_error<T>( &self, left: TValue, right: TValue, ) -> VmErrorResult<T>
luaG_concaterror
Sourceunsafe fn arith_error<T>(
&self,
left: TValue,
right: TValue,
operation: TmEvent,
) -> VmErrorResult<T>
unsafe fn arith_error<T>( &self, left: TValue, right: TValue, operation: TmEvent, ) -> VmErrorResult<T>
luaG_aritherror
Sourceunsafe fn order_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>
luaG_ordererror
Sourceunsafe fn index_error<T>(&self, object: TValue, key: TValue) -> VmErrorResult<T>
unsafe fn index_error<T>(&self, object: TValue, key: TValue) -> VmErrorResult<T>
luaG_indexerror
Sourceunsafe fn method_error<T>(
&self,
object: TValue,
key: TString,
) -> VmErrorResult<T>
unsafe fn method_error<T>( &self, object: TValue, key: TString, ) -> VmErrorResult<T>
luaG_methoderror
Sourceunsafe fn missing_member_error<T>(
&self,
object: TValue,
key: TValue,
) -> VmErrorResult<T>
unsafe fn missing_member_error<T>( &self, object: TValue, key: TValue, ) -> VmErrorResult<T>
luaG_missingmembererror
Sourceunsafe fn readonly_error<T>(&self) -> VmErrorResult<T>
unsafe fn readonly_error<T>(&self) -> VmErrorResult<T>
luaG_readonlyerror
Sourceunsafe fn run_error<'a, T, F, A>(&self, format: F, args: A) -> VmErrorResult<T>
unsafe fn run_error<'a, T, F, A>(&self, format: F, args: A) -> VmErrorResult<T>
luaG_runerror
Sourceunsafe fn push_error(&self, error: &BStr) -> VmErrorResult
unsafe fn push_error(&self, error: &BStr) -> VmErrorResult
luaG_pusherror
Sourceunsafe fn breakpoint_internal(
&self,
proto: Proto,
line: i32,
enable: bool,
) -> VmErrorResult
unsafe fn breakpoint_internal( &self, proto: Proto, line: i32, enable: bool, ) -> VmErrorResult
luaG_breakpoint
Sourceunsafe fn has_native(&self, level: i32) -> i32
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".