Trait hir::MacroFileIdExt

pub trait MacroFileIdExt {
Show 13 methods // 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, ) -> InFileWrapper<HirFileId, SyntaxNode<RustLanguage>>; fn parent(self, db: &dyn ExpandDatabase) -> HirFileId; fn expansion_info(self, db: &dyn ExpandDatabase) -> ExpansionInfo; fn is_builtin_derive(&self, db: &dyn ExpandDatabase) -> bool; fn is_custom_derive(&self, db: &dyn ExpandDatabase) -> bool; fn is_include_macro(&self, db: &dyn ExpandDatabase) -> bool; fn is_eager(&self, db: &dyn ExpandDatabase) -> bool; fn is_attr_macro(&self, db: &dyn ExpandDatabase) -> bool; fn is_derive_attr_pseudo_expansion(&self, db: &dyn ExpandDatabase) -> bool;
}

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, ) -> InFileWrapper<HirFileId, SyntaxNode<RustLanguage>>

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

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

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

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

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

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

Return whether this file is an include macro

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

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

Return whether this file is an attr macro

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§