Trait DefDatabase

Source
pub trait DefDatabase:
    InternDatabase
    + ExpandDatabase
    + SourceDatabase {
Show 40 methods // Required methods fn expand_proc_attr_macros(&self) -> bool; fn file_item_tree(&self, file_id: HirFileId) -> &ItemTree; fn macro_def(&self, m: MacroId) -> MacroDefId; fn trait_signature(&self, trait_: TraitId) -> Arc<TraitSignature>; fn impl_signature(&self, impl_: ImplId) -> Arc<ImplSignature>; fn struct_signature(&self, struct_: StructId) -> Arc<StructSignature>; fn union_signature(&self, union_: UnionId) -> Arc<UnionSignature>; fn enum_signature(&self, e: EnumId) -> Arc<EnumSignature>; fn const_signature(&self, e: ConstId) -> Arc<ConstSignature>; fn static_signature(&self, e: StaticId) -> Arc<StaticSignature>; fn function_signature(&self, e: FunctionId) -> Arc<FunctionSignature>; fn type_alias_signature(&self, e: TypeAliasId) -> Arc<TypeAliasSignature>; fn trait_signature_with_source_map( &self, trait_: TraitId, ) -> (Arc<TraitSignature>, Arc<ExpressionStoreSourceMap>); fn impl_signature_with_source_map( &self, impl_: ImplId, ) -> (Arc<ImplSignature>, Arc<ExpressionStoreSourceMap>); fn struct_signature_with_source_map( &self, struct_: StructId, ) -> (Arc<StructSignature>, Arc<ExpressionStoreSourceMap>); fn union_signature_with_source_map( &self, union_: UnionId, ) -> (Arc<UnionSignature>, Arc<ExpressionStoreSourceMap>); fn enum_signature_with_source_map( &self, e: EnumId, ) -> (Arc<EnumSignature>, Arc<ExpressionStoreSourceMap>); fn const_signature_with_source_map( &self, e: ConstId, ) -> (Arc<ConstSignature>, Arc<ExpressionStoreSourceMap>); fn static_signature_with_source_map( &self, e: StaticId, ) -> (Arc<StaticSignature>, Arc<ExpressionStoreSourceMap>); fn function_signature_with_source_map( &self, e: FunctionId, ) -> (Arc<FunctionSignature>, Arc<ExpressionStoreSourceMap>); fn type_alias_signature_with_source_map( &self, e: TypeAliasId, ) -> (Arc<TypeAliasSignature>, Arc<ExpressionStoreSourceMap>); fn body_with_source_map( &self, def: DefWithBodyId, ) -> (Arc<Body>, Arc<BodySourceMap>); fn body(&self, def: DefWithBodyId) -> Arc<Body>; fn expr_scopes(&self, def: DefWithBodyId) -> Arc<ExprScopes>; fn generic_params(&self, def: GenericDefId) -> Arc<GenericParams>; fn generic_params_and_store( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Arc<ExpressionStore>); fn generic_params_and_store_and_source_map( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Arc<ExpressionStore>, Arc<ExpressionStoreSourceMap>); fn fields_attrs(&self, def: VariantId) -> Arc<ArenaMap<LocalFieldId, Attrs>>; fn fields_attrs_source_map( &self, def: VariantId, ) -> Arc<ArenaMap<LocalFieldId, AstPtr<Either<TupleField, RecordField>>>>; fn attrs(&self, def: AttrDefId) -> Attrs; fn lang_attr(&self, def: AttrDefId) -> Option<LangItem>; fn import_map(&self, krate: Crate) -> Arc<ImportMap>; fn field_visibilities( &self, var: VariantId, ) -> Arc<ArenaMap<LocalFieldId, Visibility>>; fn assoc_visibility(&self, def: AssocItemId) -> Visibility; fn notable_traits_in_deps(&self, krate: Crate) -> Arc<[Arc<[TraitId]>]>; fn crate_notable_traits(&self, krate: Crate) -> Option<Arc<[TraitId]>>; fn crate_supports_no_std(&self, crate_id: Crate) -> bool; fn include_macro_invoc( &self, crate_id: Crate, ) -> Arc<[(MacroCallId, EditionedFileId)]>; fn set_expand_proc_attr_macros(&mut self, __value: bool); fn set_expand_proc_attr_macros_with_durability( &mut self, __value: bool, durability: Durability, );
}

Required Methods§

Source

fn expand_proc_attr_macros(&self) -> bool

Source

fn file_item_tree(&self, file_id: HirFileId) -> &ItemTree

Source

fn macro_def(&self, m: MacroId) -> MacroDefId

Source

fn trait_signature(&self, trait_: TraitId) -> Arc<TraitSignature>

Source

fn impl_signature(&self, impl_: ImplId) -> Arc<ImplSignature>

Source

fn struct_signature(&self, struct_: StructId) -> Arc<StructSignature>

Source

fn union_signature(&self, union_: UnionId) -> Arc<UnionSignature>

Source

fn enum_signature(&self, e: EnumId) -> Arc<EnumSignature>

Source

fn const_signature(&self, e: ConstId) -> Arc<ConstSignature>

Source

fn static_signature(&self, e: StaticId) -> Arc<StaticSignature>

Source

fn function_signature(&self, e: FunctionId) -> Arc<FunctionSignature>

Source

fn type_alias_signature(&self, e: TypeAliasId) -> Arc<TypeAliasSignature>

Source

fn trait_signature_with_source_map( &self, trait_: TraitId, ) -> (Arc<TraitSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn impl_signature_with_source_map( &self, impl_: ImplId, ) -> (Arc<ImplSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn struct_signature_with_source_map( &self, struct_: StructId, ) -> (Arc<StructSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn union_signature_with_source_map( &self, union_: UnionId, ) -> (Arc<UnionSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn enum_signature_with_source_map( &self, e: EnumId, ) -> (Arc<EnumSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn const_signature_with_source_map( &self, e: ConstId, ) -> (Arc<ConstSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn static_signature_with_source_map( &self, e: StaticId, ) -> (Arc<StaticSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn function_signature_with_source_map( &self, e: FunctionId, ) -> (Arc<FunctionSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn type_alias_signature_with_source_map( &self, e: TypeAliasId, ) -> (Arc<TypeAliasSignature>, Arc<ExpressionStoreSourceMap>)

Source

fn body_with_source_map( &self, def: DefWithBodyId, ) -> (Arc<Body>, Arc<BodySourceMap>)

Source

fn body(&self, def: DefWithBodyId) -> Arc<Body>

Source

fn expr_scopes(&self, def: DefWithBodyId) -> Arc<ExprScopes>

Source

fn generic_params(&self, def: GenericDefId) -> Arc<GenericParams>

Source

fn generic_params_and_store( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Arc<ExpressionStore>)

Source

fn generic_params_and_store_and_source_map( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Arc<ExpressionStore>, Arc<ExpressionStoreSourceMap>)

Source

fn fields_attrs(&self, def: VariantId) -> Arc<ArenaMap<LocalFieldId, Attrs>>

Source

fn fields_attrs_source_map( &self, def: VariantId, ) -> Arc<ArenaMap<LocalFieldId, AstPtr<Either<TupleField, RecordField>>>>

Source

fn attrs(&self, def: AttrDefId) -> Attrs

Source

fn lang_attr(&self, def: AttrDefId) -> Option<LangItem>

Source

fn import_map(&self, krate: Crate) -> Arc<ImportMap>

Source

fn field_visibilities( &self, var: VariantId, ) -> Arc<ArenaMap<LocalFieldId, Visibility>>

Source

fn assoc_visibility(&self, def: AssocItemId) -> Visibility

Source

fn notable_traits_in_deps(&self, krate: Crate) -> Arc<[Arc<[TraitId]>]>

Source

fn crate_notable_traits(&self, krate: Crate) -> Option<Arc<[TraitId]>>

Source

fn crate_supports_no_std(&self, crate_id: Crate) -> bool

Source

fn include_macro_invoc( &self, crate_id: Crate, ) -> Arc<[(MacroCallId, EditionedFileId)]>

Source

fn set_expand_proc_attr_macros(&mut self, __value: bool)

Source

fn set_expand_proc_attr_macros_with_durability( &mut self, __value: bool, durability: Durability, )

Implementors§

Source§

impl<DB> DefDatabase for DB
where DB: InternDatabase + ExpandDatabase + SourceDatabase,