pub struct TranslationUnit {
pub items: Vec<ExternalDecl>,
pub records: Vec<RecordSpec>,
pub enums: Vec<EnumSpec>,
pub typeofs: Vec<TypeofOperand>,
pub range: SourceRange,
}Expand description
A whole translation unit — the contents of one c99! invocation.
Fields§
§items: Vec<ExternalDecl>The top-level items.
records: Vec<RecordSpec>Every struct/union specifier written in the unit, in source order.
TypeKind::Record indexes this; see RecordSpecId.
enums: Vec<EnumSpec>Every enum specifier written in the unit, in source order.
typeofs: Vec<TypeofOperand>Every typeof operand written in the unit, in source order.
range: SourceRangeThe range covering the whole input.
Implementations§
Source§impl TranslationUnit
impl TranslationUnit
Sourcepub fn record(&self, id: RecordSpecId) -> &RecordSpec
pub fn record(&self, id: RecordSpecId) -> &RecordSpec
The struct/union specifier id names.
Sourcepub fn enum_spec(&self, id: EnumSpecId) -> &EnumSpec
pub fn enum_spec(&self, id: EnumSpecId) -> &EnumSpec
The enum specifier id names.
Sourcepub fn typeof_operand(&self, id: TypeofId) -> &TypeofOperand
pub fn typeof_operand(&self, id: TypeofId) -> &TypeofOperand
The typeof operand id names.
Trait Implementations§
Source§impl Clone for TranslationUnit
impl Clone for TranslationUnit
Source§impl Debug for TranslationUnit
impl Debug for TranslationUnit
Source§impl PartialEq for TranslationUnit
impl PartialEq for TranslationUnit
impl StructuralPartialEq for TranslationUnit
Auto Trait Implementations§
impl Freeze for TranslationUnit
impl RefUnwindSafe for TranslationUnit
impl Send for TranslationUnit
impl Sync for TranslationUnit
impl Unpin for TranslationUnit
impl UnsafeUnpin for TranslationUnit
impl UnwindSafe for TranslationUnit
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