pub struct GoModule {
pub package: String,
pub imports: Vec<String>,
pub types: Vec<GoTypeDecl>,
pub funcs: Vec<GoFunc>,
pub vars: Vec<GoStmt>,
pub consts: Vec<(String, GoType, GoExpr)>,
}Expand description
A complete Go source file / module.
Fields§
§package: StringPackage name.
imports: Vec<String>Import paths.
types: Vec<GoTypeDecl>Type declarations.
funcs: Vec<GoFunc>Function declarations.
vars: Vec<GoStmt>Package-level variable declarations.
consts: Vec<(String, GoType, GoExpr)>Constant declarations.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GoModule
impl RefUnwindSafe for GoModule
impl Send for GoModule
impl Sync for GoModule
impl Unpin for GoModule
impl UnsafeUnpin for GoModule
impl UnwindSafe for GoModule
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