pub struct JsModule {
pub statements: Vec<Stmt>,
pub metadata: Option<GenerationMetadata>,
}Expand description
A complete JavaScript module.
Modules are the top-level unit of code generation. They contain statements and track generation metadata.
Fields§
§statements: Vec<Stmt>Module-level statements
metadata: Option<GenerationMetadata>Generation metadata (tool version, hash, etc.)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JsModule
impl<'de> Deserialize<'de> for JsModule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for JsModule
Auto Trait Implementations§
impl Freeze for JsModule
impl RefUnwindSafe for JsModule
impl Send for JsModule
impl Sync for JsModule
impl Unpin for JsModule
impl UnsafeUnpin for JsModule
impl UnwindSafe for JsModule
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