pub unsafe trait RawLoader {
// Required method
unsafe fn raw_load<'js>(
&mut self,
ctx: &Ctx<'js>,
name: &str
) -> Result<Module<'js>>;
}
Available on crate feature loader
only.
Expand description
The Raw Module loader interface.
When implementing a module loader prefer the to implement Loader
instead.
All struct which implement Loader
will automatically implement this trait.
§Safety
Implementors must ensure that all module declaration and evaluation errors are returned from
this function.
Load module by name, should return an unevaluated module.
§Safety
Callers must ensure that the module returned by this function is not used after an module
declaration or evaluation failed.