pub trait ProtectedCall: Sealed {
// Required methods
unsafe fn raw_run_protected<T>(
&self,
function: Pfunc<T>,
userdata: &mut T,
) -> VmResult;
unsafe fn protected_call_internal<T>(
&self,
function: Pfunc<T>,
userdata: &mut T,
old_top: isize,
error_function: isize,
) -> VmResult;
}Expand description
Unstable protected-execution capability.
§Safety
The thread, callback context, saved stack offsets, and error-function position must remain valid for the protected operation. The callback must obey the VM unwind protocol and may not let Rust unwinding cross the VM.
Required Methods§
unsafe fn raw_run_protected<T>( &self, function: Pfunc<T>, userdata: &mut T, ) -> VmResult
unsafe fn protected_call_internal<T>( &self, function: Pfunc<T>, userdata: &mut T, old_top: isize, error_function: isize, ) -> VmResult
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".