pub enum ModuleSource {
Source {
text: Vec<u8>,
import_meta: Vec<(String, Value)>,
},
Json(Vec<u8>),
Json5(Vec<u8>),
Compiled(CompiledModule),
Synthetic {
exports: Vec<(String, Value)>,
},
}Expand description
What a loader returns for a module name.
Variants§
Source
JavaScript module source, with the properties its import.meta
starts with.
Json(Vec<u8>)
A JSON module.
Json5(Vec<u8>)
A JSON5 module (type: "json5").
Compiled(CompiledModule)
A module compiled through ModuleScope::compile_module.
Synthetic
A module whose exports are these values, each under its name;
default is the default export.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleSource
impl !Send for ModuleSource
impl !Sync for ModuleSource
impl !UnwindSafe for ModuleSource
impl Freeze for ModuleSource
impl Unpin for ModuleSource
impl UnsafeUnpin 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