pub struct TranslationUnit {
pub language: Language,
pub declarations: Vec<Decl>,
pub declaration_spans: Vec<SourceSpan>,
}Expand description
A parsed header translation unit.
Fields§
§language: LanguageSource language.
declarations: Vec<Decl>Typed declarations in source order.
declaration_spans: Vec<SourceSpan>Source span for each declaration when the unit came from the parser.
Programmatically constructed units may leave this empty. A parsed unit always has exactly one entry per declaration; declarations lowered from one multi-declarator syntax node share that node’s span.
Trait Implementations§
Source§impl Clone for TranslationUnit
impl Clone for TranslationUnit
Source§impl Debug for TranslationUnit
impl Debug for TranslationUnit
impl Eq for TranslationUnit
Source§impl Hash for TranslationUnit
impl Hash 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