pub type FizzyExternalFn = Option<unsafe extern "C" fn(host_ctx: *mut c_void, instance: *mut FizzyInstance, args: *const FizzyValue, ctx: *mut FizzyExecutionContext) -> FizzyExecutionResult>;Expand description
Pointer to external function.
@param host_ctx Opaque pointer to host context. @param instance Pointer to module instance. @param args Pointer to the argument array. Can be NULL iff function has no inputs. @param ctx Opaque pointer to execution context. If NULL new execution context will be allocated. @return Result of execution.
@note External functions implemented in C++ must be non-throwing, i.e. the effect of any exception escaping the function is std::terminate being called.
Aliased Type§
pub enum FizzyExternalFn {
None,
Some(unsafe extern "C" fn(*mut c_void, *mut FizzyInstance, *const FizzyValue, *mut FizzyExecutionContext) -> FizzyExecutionResult),
}Variants§
None
No value.
Some(unsafe extern "C" fn(*mut c_void, *mut FizzyInstance, *const FizzyValue, *mut FizzyExecutionContext) -> FizzyExecutionResult)
Some value of type T.