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.

Required Methods§

source

unsafe fn raw_load<'js>( &mut self, ctx: Ctx<'js>, name: &str ) -> Result<Module<'js>>

Load module by name, should return an unevaluted module.

Safety

Callers must ensure that the module returned by this function is not used after an module declaration or evaluation failed.

Implementors§

source§

impl<L> RawLoader for Compile<L>where L: Loader,

source§

impl<T: Loader> RawLoader for T