Type Alias hir_expand::files::AstId

source ·
pub type AstId<N> = InFile<FileAstId<N>>;
Expand description

AstId points to an AST node in any file.

It is stable across reparses, and can be used as salsa key/value.

Aliased Type§

struct AstId<N> {
    pub file_id: HirFileId,
    pub value: FileAstId<N>,
}

Fields§

§file_id: HirFileId§value: FileAstId<N>

Implementations§

source§

impl<N: AstIdNode> AstId<N>

source

pub fn to_node(&self, db: &dyn ExpandDatabase) -> N

source

pub fn to_range(&self, db: &dyn ExpandDatabase) -> TextRange

source

pub fn to_in_file_node(&self, db: &dyn ExpandDatabase) -> InFile<N>

source

pub fn to_ptr(&self, db: &dyn ExpandDatabase) -> AstPtr<N>