pub trait ModuleDef {
// Provided methods
fn declare<'js>(decl: &Declarations<'js>) -> Result<()> { ... }
fn evaluate<'js>(ctx: &Ctx<'js>, exports: &Exports<'js>) -> Result<()> { ... }
}
Expand description
A class which can be used to declare rust-native JavaScript modules.
Provided Methods§
fn declare<'js>(decl: &Declarations<'js>) -> Result<()>
fn evaluate<'js>(ctx: &Ctx<'js>, exports: &Exports<'js>) -> Result<()>
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.