pub struct Program {
pub version: Version,
pub items: Vec<Item>,
pub end: usize,
pub constants: Option<ConstantTable>,
pub debug: Option<DebugInfo>,
}Expand description
A program read: its version, its records in stream order, its constant table and its debug information.
Fields§
§version: VersionThe version token.
items: Vec<Item>Every record between the version token and END, in stream order.
end: usizeThe word of END.
constants: Option<ConstantTable>The CTAB comment decoded; None when the program has none.
debug: Option<DebugInfo>The DBUG comment decoded (a /Zi build’s); None when the program has none.
Implementations§
Source§impl Program
impl Program
Sourcepub fn declarations(&self) -> impl Iterator<Item = &Declaration>
pub fn declarations(&self) -> impl Iterator<Item = &Declaration>
The declarations, in stream order.
Sourcepub fn definitions(&self) -> impl Iterator<Item = &Definition>
pub fn definitions(&self) -> impl Iterator<Item = &Definition>
The definitions, in stream order.
Sourcepub fn instructions(&self) -> impl Iterator<Item = &Instruction>
pub fn instructions(&self) -> impl Iterator<Item = &Instruction>
The instructions, in stream order.
Trait Implementations§
impl Eq for Program
impl StructuralPartialEq for Program
Auto Trait Implementations§
impl Forget for Program
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