pub enum TopLevelItem {
Preprocessor(PreprocessorDirective),
TypeDefinition(TypeDefItem),
FunctionDeclaration(FunctionDeclItem),
FunctionDefinition(FunctionDefItem),
Declaration(Box<VariableDecl>),
Expression(Box<Expression>),
Comment(Comment),
}Expand description
Represents a top-level item in a C file
Variants§
Preprocessor(PreprocessorDirective)
Preprocessor directive (#define, #include, etc.)
TypeDefinition(TypeDefItem)
Type definition (typedef, enum, struct)
FunctionDeclaration(FunctionDeclItem)
Function declaration (forward declaration)
FunctionDefinition(FunctionDefItem)
Function definition (with body)
Declaration(Box<VariableDecl>)
Standalone variable declaration
Expression(Box<Expression>)
Standalone expression statement
Comment(Comment)
Standalone GTK-Doc comment not attached to any declaration
Implementations§
Trait Implementations§
Source§impl Clone for TopLevelItem
impl Clone for TopLevelItem
Source§impl Debug for TopLevelItem
impl Debug for TopLevelItem
Auto Trait Implementations§
impl Freeze for TopLevelItem
impl RefUnwindSafe for TopLevelItem
impl Send for TopLevelItem
impl Sync for TopLevelItem
impl Unpin for TopLevelItem
impl UnsafeUnpin for TopLevelItem
impl UnwindSafe for TopLevelItem
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