NativeModule

Trait NativeModule 

Source
pub trait NativeModule {
    // Required methods
    fn load(
        &self,
        module: Rc<Module>,
        interpreter: &mut Interpreter,
        args: &[DataObjectRef],
    ) -> OptionDataObjectRef;
    fn unload(
        &self,
        module: Rc<Module>,
        interpreter: &mut Interpreter,
        args: &[DataObjectRef],
    ) -> OptionDataObjectRef;
}

Required Methods§

Source

fn load( &self, module: Rc<Module>, interpreter: &mut Interpreter, args: &[DataObjectRef], ) -> OptionDataObjectRef

Will be called if the module is loaded

@param args provided to “func.loadModule()” [modulePath included] separated with ARGUMENT_SEPARATORs @return Will be returned for the “linker.loadModule()” call

Source

fn unload( &self, module: Rc<Module>, interpreter: &mut Interpreter, args: &[DataObjectRef], ) -> OptionDataObjectRef

Will be called if the module is unloaded

@param args provided to “func.unloadModule()” [modulePath included] separated with ARGUMENT_SEPARATORs @return Will be returned for the “linker.unloadModule()” call

Trait Implementations§

Source§

impl Debug for dyn NativeModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§