pub enum ModuleKind {
JavaScript,
Json,
Text,
Bytes,
}Expand description
How a module’s source became a module.
A JSON or text module is not code at all — it is one value exported as default — so
it has no body and no imports, which is why this is a flag rather than a second type.
Variants§
JavaScript
JavaScript: has a compiled body.
Json
A parsed JSON document, exported as default.
Text
A plain string, exported as default.
Bytes
A Uint8Array, exported as default.
Trait Implementations§
Source§impl Clone for ModuleKind
impl Clone for ModuleKind
impl Copy for ModuleKind
Source§impl Debug for ModuleKind
impl Debug for ModuleKind
impl Eq for ModuleKind
Source§impl PartialEq for ModuleKind
impl PartialEq for ModuleKind
impl StructuralPartialEq for ModuleKind
Auto Trait Implementations§
impl Forget for ModuleKind
impl Freeze for ModuleKind
impl Move for ModuleKind
impl RefUnwindSafe for ModuleKind
impl Send for ModuleKind
impl Sync for ModuleKind
impl Unpin for ModuleKind
impl UnsafeUnpin for ModuleKind
impl UnwindSafe for ModuleKind
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