Trait mun_hir::DefDatabase

source ·
pub trait DefDatabase: Database + HasQueryGroup<DefDatabaseStorage> + InternDatabase + AstDatabase + Upcast<dyn AstDatabase> {
    fn item_tree(&self, key0: FileId) -> Arc<ItemTree>;
    fn struct_data(&self, key0: StructId) -> Arc<StructData>;
    fn type_alias_data(&self, key0: TypeAliasId) -> Arc<TypeAliasData>;
    fn fn_data(&self, key0: FunctionId) -> Arc<FunctionData>;
    fn package_defs(&self, key0: PackageId) -> Arc<PackageDefs>;
    fn body(&self, key0: DefWithBodyId) -> Arc<Body>;
    fn body_with_source_map(
        &self,
        key0: DefWithBodyId
    ) -> (Arc<Body>, Arc<BodySourceMap>); fn expr_scopes(&self, key0: DefWithBodyId) -> Arc<ExprScopes>; }

Required Methods§

Returns the ItemTree for a specific file. An ItemTree represents all the top level declarations within a file.

Returns the PackageDefs for the specified PackageId. The PackageDefs contains all resolved items defined for every module in the package.

Implementors§