Type Alias fluence_app_service::HostImportDescriptor
source · pub type HostImportDescriptor = HostImportDescriptor<WasmtimeWasmBackend>;Aliased Type§
struct HostImportDescriptor {
pub host_exported_func: Box<dyn for<'c> Fn(&mut WasmtimeImportCallContext<'c>, Vec<IValue>) -> Option<IValue> + Send + Sync>,
pub argument_types: Vec<IType>,
pub output_type: Option<IType>,
pub error_handler: Option<Box<dyn Fn(&HostImportError) -> Option<IValue> + Send + Sync>>,
}Fields§
§host_exported_func: Box<dyn for<'c> Fn(&mut WasmtimeImportCallContext<'c>, Vec<IValue>) -> Option<IValue> + Send + Sync>This closure will be invoked for corresponding import.
argument_types: Vec<IType>Type of the closure arguments.
output_type: Option<IType>Types of output of the closure.
error_handler: Option<Box<dyn Fn(&HostImportError) -> Option<IValue> + Send + Sync>>If Some, this closure is called with error when errors is encountered while lifting. If None, panic will occur.