pub trait ModuleLoader: Clone {
// Required methods
fn resolve(&self, caller_module: &str, module: &str) -> Option<String>;
fn load(&self, module: &str) -> Option<String>;
}
Expand description
The embedder needs to implement this trait to specify how to resolve import paths
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl ModuleLoader for NoopModuleLoader
A module loader that always returns None