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.
Auto Trait Implementations
impl !RefUnwindSafe for HostImportDescriptor
impl !Send for HostImportDescriptor
impl !Sync for HostImportDescriptor
impl Unpin for HostImportDescriptor
impl !UnwindSafe for HostImportDescriptor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more