Trait hir_expand::HirFileIdExt

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

Required Methods§

source

fn edition(self, db: &dyn ExpandDatabase) -> Edition

source

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

Returns the original file of this macro call hierarchy.

source

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

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 as_builtin_derive_attr_node( &self, db: &dyn ExpandDatabase, ) -> Option<InFile<Attr>>

Implementors§