pub enum PreprocessorDirective {
Include {
path: String,
is_system: bool,
location: SourceLocation,
},
Define {
name: String,
value: Option<DefineValue>,
location: SourceLocation,
},
Call {
directive: String,
location: SourceLocation,
},
Pragma {
kind: PragmaKind,
location: SourceLocation,
},
GObjectType(Box<GObjectType>),
AutoptrCleanupFunc {
type_name: String,
cleanup_function: String,
location: SourceLocation,
},
AutoCleanupClearFunc {
type_name: String,
cleanup_function: String,
location: SourceLocation,
},
MacroWithCode {
macro_name: String,
arguments: Vec<String>,
code_statements: Vec<Statement>,
location: SourceLocation,
},
Conditional {
kind: ConditionalKind,
condition: Option<String>,
body: Vec<TopLevelItem>,
location: SourceLocation,
},
GObjectDeclsBlock {
body: Vec<TopLevelItem>,
location: SourceLocation,
},
}Variants§
Include
Define
Call
Pragma
GObjectType(Box<GObjectType>)
GObject type declaration/definition (G_DECLARE_, G_DEFINE_)
AutoptrCleanupFunc
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Type, cleanup_func)
AutoCleanupClearFunc
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (Type, cleanup_func)
MacroWithCode
Macro call with code block (e.g., G_DEFINE_BOXED_TYPE_WITH_CODE) Contains the macro name and parsed statements from the code block
Fields
§
location: SourceLocationConditional
GObjectDeclsBlock
G_BEGIN_DECLS … G_END_DECLS block
Implementations§
Source§impl PreprocessorDirective
impl PreprocessorDirective
pub fn location(&self) -> &SourceLocation
Trait Implementations§
Source§impl Clone for PreprocessorDirective
impl Clone for PreprocessorDirective
Source§impl Debug for PreprocessorDirective
impl Debug for PreprocessorDirective
Auto Trait Implementations§
impl Freeze for PreprocessorDirective
impl RefUnwindSafe for PreprocessorDirective
impl Send for PreprocessorDirective
impl Sync for PreprocessorDirective
impl Unpin for PreprocessorDirective
impl UnsafeUnpin for PreprocessorDirective
impl UnwindSafe for PreprocessorDirective
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