Trait ra_ap_hir_expand::HirFileIdExt

source ·
pub trait HirFileIdExt {
    // Required methods
    fn original_file(self, db: &dyn ExpandDatabase) -> FileId;
    fn original_file_respecting_includes(
        self,
        db: &dyn ExpandDatabase
    ) -> FileId;
    fn original_call_node(
        self,
        db: &dyn ExpandDatabase
    ) -> Option<InRealFile<SyntaxNode>>;
    fn expansion_info(self, db: &dyn ExpandDatabase) -> Option<ExpansionInfo>;
    fn as_builtin_derive_attr_node(
        &self,
        db: &dyn ExpandDatabase
    ) -> Option<InFile<Attr>>;
}

Required Methods§

source

fn original_file(self, db: &dyn ExpandDatabase) -> FileId

Returns the original file of this macro call hierarchy.

source

fn original_file_respecting_includes(self, db: &dyn ExpandDatabase) -> FileId

Returns the original file of this macro call hierarchy while going into the included file if one of the calls comes from an `include!``.

source

fn original_call_node( self, db: &dyn ExpandDatabase ) -> Option<InRealFile<SyntaxNode>>

If this is a macro call, returns the syntax node of the very first macro call this file resides in.

source

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

Return expansion information if it is a macro-expansion file

source

fn as_builtin_derive_attr_node( &self, db: &dyn ExpandDatabase ) -> Option<InFile<Attr>>

Implementors§