pub struct Program {
pub declarations: Vec<Decl>,
}Expand description
Top-level program: a sequence of declarations.
Fields§
§declarations: Vec<Decl>Implementations§
Source§impl Program
impl Program
Sourcepub fn function_count(&self) -> usize
pub fn function_count(&self) -> usize
Number of function declarations (including nested in impls).
Sourcepub fn struct_count(&self) -> usize
pub fn struct_count(&self) -> usize
Number of struct declarations.
Sourcepub fn has_main_function(&self) -> bool
pub fn has_main_function(&self) -> bool
Returns true if there is a function named “main”.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
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