pub enum ModuleSource {
Compiled {
function: ObjectId,
tables: ModuleTables,
import_meta: Vec<(String, Value)>,
},
Json(JsonText),
Json5(JsonText),
Synthetic {
exports: Vec<(String, Value)>,
},
}Expand description
A loaded module: its root function (instantiated in the Compiler)
and its tables, or the text of a JSON module.
Variants§
Compiled
Fields
§
tables: ModuleTablesJson(JsonText)
Json5(JsonText)
A JSON5 module (QuickJS’s extended JSON, type: "json5").
Synthetic
A module whose exports the embedder supplies, each a binding of
its own (default is the default export); the values must be
rooted by the loader.
Auto Trait Implementations§
impl Freeze for ModuleSource
impl RefUnwindSafe for ModuleSource
impl Send for ModuleSource
impl Sync for ModuleSource
impl Unpin for ModuleSource
impl UnsafeUnpin for ModuleSource
impl UnwindSafe for ModuleSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more