Skip to main content

Loader

Trait Loader 

Source
pub trait Loader {
    // Required method
    fn load<'js>(
        &mut self,
        ctx: &Ctx<'js>,
        name: &str,
        attributes: Option<ImportAttributes<'js>>,
    ) -> Result<Module<'js, Declared>>;
}
Available on crate feature loader only.
Expand description

Module loader interface

Required Methods§

Source

fn load<'js>( &mut self, ctx: &Ctx<'js>, name: &str, attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Load module by name with import attributes

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Loader for ()

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Source§

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

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Source§

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

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Source§

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

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Source§

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

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Source§

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

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Source§

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

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Source§

impl<A, B, C, D, E, F, G> Loader for (A, B, C, D, E, F, G)
where A: Loader, B: Loader, C: Loader, D: Loader, E: Loader, F: Loader, G: Loader,

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Source§

impl<A, B, C, D, E, F, G, H> Loader for (A, B, C, D, E, F, G, H)
where A: Loader, B: Loader, C: Loader, D: Loader, E: Loader, F: Loader, G: Loader, H: Loader,

Source§

fn load<'js>( &mut self, _ctx: &Ctx<'js>, name: &str, _attributes: Option<ImportAttributes<'js>>, ) -> Result<Module<'js, Declared>>

Implementors§