pub struct HostImportDescriptor {
pub host_exported_func: Box<dyn Fn(&mut Ctx, Vec<IValue, Global>) + 'static, Global>,
pub argument_types: Vec<IType, Global>,
pub output_type: Option<IType>,
pub error_handler: Option<Box<dyn Fn(&HostImportError) + 'static, Global>>,
}
Fields
host_exported_func: Box<dyn Fn(&mut Ctx, Vec<IValue, Global>) + 'static, Global>
This closure will be invoked for corresponding import.
argument_types: Vec<IType, Global>
Type of the closure arguments.
output_type: Option<IType>
Types of output of the closure.
error_handler: Option<Box<dyn Fn(&HostImportError) + 'static, Global>>
If Some, this closure is called with error when errors is encountered while lifting. If None, panic will occur.