Struct quickjs_runtime::quickjsruntime::NativeModuleLoaderAdapter [−][src]
pub struct NativeModuleLoaderAdapter { /* fields omitted */ }Implementations
Trait Implementations
fn normalize_path(
&self,
q_ctx: &QuickJsContext,
_ref_path: &str,
path: &str
) -> Option<String>
fn normalize_path(
&self,
q_ctx: &QuickJsContext,
_ref_path: &str,
path: &str
) -> Option<String>the normalize methods is used to translate a possible relative path to an absolute path of a module it doubles as a method to see IF a module can actually be loaded by a module loader (return None if the module can not be found) Read more
fn load_module(
&self,
q_ctx: &QuickJsContext,
absolute_path: &str
) -> Result<*mut JSModuleDef, JsError>
fn load_module(
&self,
q_ctx: &QuickJsContext,
absolute_path: &str
) -> Result<*mut JSModuleDef, JsError>load the Module
has module is used to check if a loader can provide a certain module, this is currently used to check which loader should init a native module
unsafe fn init_module(
&self,
q_ctx: &QuickJsContext,
module: *mut JSModuleDef
) -> Result<(), JsError>
unsafe fn init_module(
&self,
q_ctx: &QuickJsContext,
module: *mut JSModuleDef
) -> Result<(), JsError>init a module, currently used to init native modules Read more
Auto Trait Implementations
impl !RefUnwindSafe for NativeModuleLoaderAdapterimpl !Send for NativeModuleLoaderAdapterimpl !Sync for NativeModuleLoaderAdapterimpl Unpin for NativeModuleLoaderAdapterimpl !UnwindSafe for NativeModuleLoaderAdapter