Trait MacroFileIdExt

Source
pub trait MacroFileIdExt {
    // Required methods
    fn is_env_or_option_env(&self, db: &dyn ExpandDatabase) -> bool;
    fn is_include_like_macro(&self, db: &dyn ExpandDatabase) -> bool;
    fn eager_arg(&self, db: &dyn ExpandDatabase) -> Option<MacroCallId>;
    fn expansion_level(self, db: &dyn ExpandDatabase) -> u32;
    fn call_node(self, db: &dyn ExpandDatabase) -> InFile<SyntaxNode>;
    fn parent(self, db: &dyn ExpandDatabase) -> HirFileId;
    fn expansion_info(self, db: &dyn ExpandDatabase) -> ExpansionInfo;
    fn kind(&self, db: &dyn ExpandDatabase) -> MacroKind;
    fn is_include_macro(&self, db: &dyn ExpandDatabase) -> bool;
    fn is_eager(&self, db: &dyn ExpandDatabase) -> bool;
    fn is_derive_attr_pseudo_expansion(&self, db: &dyn ExpandDatabase) -> bool;
}

Required Methods§

Source

fn is_env_or_option_env(&self, db: &dyn ExpandDatabase) -> bool

Source

fn is_include_like_macro(&self, db: &dyn ExpandDatabase) -> bool

Source

fn eager_arg(&self, db: &dyn ExpandDatabase) -> Option<MacroCallId>

Source

fn expansion_level(self, db: &dyn ExpandDatabase) -> u32

Source

fn call_node(self, db: &dyn ExpandDatabase) -> InFile<SyntaxNode>

If this is a macro call, returns the syntax node of the call.

Source

fn parent(self, db: &dyn ExpandDatabase) -> HirFileId

Source

fn expansion_info(self, db: &dyn ExpandDatabase) -> ExpansionInfo

Source

fn kind(&self, db: &dyn ExpandDatabase) -> MacroKind

Source

fn is_include_macro(&self, db: &dyn ExpandDatabase) -> bool

Return whether this file is an include macro

Source

fn is_eager(&self, db: &dyn ExpandDatabase) -> bool

Source

fn is_derive_attr_pseudo_expansion(&self, db: &dyn ExpandDatabase) -> bool

Return whether this file is the pseudo expansion of the derive attribute. See [crate::builtin_attr_macro::derive_attr_expand].

Implementors§