Trait ModuleDef

Source
pub trait ModuleDef {
    // Provided methods
    fn declare<'js>(decl: &Declarations<'js>) -> Result<(), Error> { ... }
    fn evaluate<'js>(
        ctx: &Ctx<'js>,
        exports: &Exports<'js>,
    ) -> Result<(), Error> { ... }
}
Expand description

A class which can be used to declare rust-native JavaScript modules.

Provided Methods§

Source

fn declare<'js>(decl: &Declarations<'js>) -> Result<(), Error>

Source

fn evaluate<'js>(ctx: &Ctx<'js>, exports: &Exports<'js>) -> Result<(), Error>

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§