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§
Sourcefn load(
&self,
module: Rc<Module>,
interpreter: &mut Interpreter,
args: &[DataObjectRef],
) -> OptionDataObjectRef
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
Sourcefn unload(
&self,
module: Rc<Module>,
interpreter: &mut Interpreter,
args: &[DataObjectRef],
) -> OptionDataObjectRef
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