pub struct ZigModule {
pub name: String,
pub imports: Vec<String>,
pub structs: Vec<ZigStruct>,
pub fns: Vec<ZigFn>,
pub consts: Vec<(String, ZigType, ZigExpr)>,
}Expand description
Represents a complete Zig module (source file).
Fields§
§name: String§imports: Vec<String>§structs: Vec<ZigStruct>§fns: Vec<ZigFn>§consts: Vec<(String, ZigType, ZigExpr)>Implementations§
Source§impl ZigModule
impl ZigModule
Sourcepub fn add_import(&mut self, path: &str)
pub fn add_import(&mut self, path: &str)
Add an import statement (e.g., @import("std")).
Sourcepub fn add_struct(&mut self, s: ZigStruct)
pub fn add_struct(&mut self, s: ZigStruct)
Add a struct definition.
Auto Trait Implementations§
impl Freeze for ZigModule
impl RefUnwindSafe for ZigModule
impl Send for ZigModule
impl Sync for ZigModule
impl Unpin for ZigModule
impl UnsafeUnpin for ZigModule
impl UnwindSafe for ZigModule
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