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 unevaluated module.

§Safety

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

Implementations on Foreign Types§

source§

impl RawLoader for ()

source§

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

source§

impl<A> RawLoader for (A,)
where A: RawLoader,

source§

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

source§

impl<A, B> RawLoader for (A, B)
where A: RawLoader, B: RawLoader,

source§

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

source§

impl<A, B, C> RawLoader for (A, B, C)
where A: RawLoader, B: RawLoader, C: RawLoader,

source§

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

source§

impl<A, B, C, D> RawLoader for (A, B, C, D)
where A: RawLoader, B: RawLoader, C: RawLoader, D: RawLoader,

source§

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

source§

impl<A, B, C, D, E> RawLoader for (A, B, C, D, E)
where A: RawLoader, B: RawLoader, C: RawLoader, D: RawLoader, E: RawLoader,

source§

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

source§

impl<A, B, C, D, E, F> RawLoader for (A, B, C, D, E, F)

source§

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

source§

impl<A, B, C, D, E, F, G> RawLoader for (A, B, C, D, E, F, G)

source§

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

source§

impl<A, B, C, D, E, F, G, H> RawLoader for (A, B, C, D, E, F, G, H)

source§

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

Implementors§

source§

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

source§

impl<T: Loader> RawLoader for T