Struct ra_ap_ide_db::RootDatabase
source · pub struct RootDatabase { /* private fields */ }Implementations§
source§impl RootDatabase
impl RootDatabase
pub fn request_cancellation(&mut self)
pub fn apply_change(&mut self, change: Change)
pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes, usize)>
source§impl RootDatabase
impl RootDatabase
pub fn new(lru_capacity: Option<usize>) -> RootDatabase
pub fn enable_proc_attr_macros(&mut self)
pub fn update_parse_query_lru_capacity(&mut self, lru_capacity: Option<usize>)
pub fn update_lru_capacities( &mut self, lru_capacities: &FxHashMap<Box<str>, usize> )
Trait Implementations§
source§impl Database for RootDatabase
impl Database for RootDatabase
§fn salsa_event(&self, event_fn: Event)
fn salsa_event(&self, event_fn: Event)
This function is invoked at key points in the salsa
runtime. It permits the database to be customized and to
inject logging or other custom behavior.
§fn unwind_if_cancelled(&self)
fn unwind_if_cancelled(&self)
Starts unwinding the stack if the current revision is cancelled. Read more
§fn salsa_runtime(&self) -> &Runtime
fn salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime. Read more
§fn salsa_runtime_mut(&mut self) -> &mut Runtime
fn salsa_runtime_mut(&mut self) -> &mut Runtime
Gives access to the underlying salsa runtime. Read more
source§impl DatabaseOps for RootDatabase
impl DatabaseOps for RootDatabase
source§fn ops_database(&self) -> &dyn Database
fn ops_database(&self) -> &dyn Database
Upcast this type to a
dyn Database.source§fn ops_salsa_runtime(&self) -> &Runtime
fn ops_salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime.
source§fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
Gives access to the underlying salsa runtime.
source§fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result
fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result
Formats a database key index in a human readable fashion.
source§fn maybe_changed_after(
&self,
input: DatabaseKeyIndex,
revision: Revision
) -> bool
fn maybe_changed_after( &self, input: DatabaseKeyIndex, revision: Revision ) -> bool
True if the computed value for
input may have changed since revision.source§fn cycle_recovery_strategy(
&self,
input: DatabaseKeyIndex
) -> CycleRecoveryStrategy
fn cycle_recovery_strategy( &self, input: DatabaseKeyIndex ) -> CycleRecoveryStrategy
Find the
CycleRecoveryStrategy for a given input.source§fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))
fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))
Executes the callback for each kind of query.
source§impl DatabaseStorageTypes for RootDatabase
impl DatabaseStorageTypes for RootDatabase
§type DatabaseStorage = __SalsaDatabaseStorage
type DatabaseStorage = __SalsaDatabaseStorage
Defines the “storage type”, where all the query data is kept.
This type is defined by the
database_storage macro.source§impl Debug for RootDatabase
impl Debug for RootDatabase
source§impl Default for RootDatabase
impl Default for RootDatabase
source§fn default() -> RootDatabase
fn default() -> RootDatabase
Returns the “default value” for a type. Read more
source§impl Drop for RootDatabase
impl Drop for RootDatabase
source§impl FileLoader for RootDatabase
impl FileLoader for RootDatabase
source§impl HasQueryGroup<DefDatabaseStorage> for RootDatabase
impl HasQueryGroup<DefDatabaseStorage> for RootDatabase
source§fn group_storage(&self) -> &<DefDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<DefDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<ExpandDatabaseStorage> for RootDatabase
impl HasQueryGroup<ExpandDatabaseStorage> for RootDatabase
source§fn group_storage(&self) -> &<ExpandDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<ExpandDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<HirDatabaseStorage> for RootDatabase
impl HasQueryGroup<HirDatabaseStorage> for RootDatabase
source§fn group_storage(&self) -> &<HirDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<HirDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<InternDatabaseStorage> for RootDatabase
impl HasQueryGroup<InternDatabaseStorage> for RootDatabase
source§fn group_storage(&self) -> &<InternDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<InternDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<LineIndexDatabaseStorage> for RootDatabase
impl HasQueryGroup<LineIndexDatabaseStorage> for RootDatabase
source§fn group_storage(
&self
) -> &<LineIndexDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage( &self ) -> &<LineIndexDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<SourceDatabaseExtStorage> for RootDatabase
impl HasQueryGroup<SourceDatabaseExtStorage> for RootDatabase
source§fn group_storage(
&self
) -> &<SourceDatabaseExtStorage as QueryGroup>::GroupStorage
fn group_storage( &self ) -> &<SourceDatabaseExtStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<SourceDatabaseStorage> for RootDatabase
impl HasQueryGroup<SourceDatabaseStorage> for RootDatabase
source§fn group_storage(&self) -> &<SourceDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<SourceDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<SymbolsDatabaseStorage> for RootDatabase
impl HasQueryGroup<SymbolsDatabaseStorage> for RootDatabase
source§fn group_storage(&self) -> &<SymbolsDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<SymbolsDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl ParallelDatabase for RootDatabase
impl ParallelDatabase for RootDatabase
source§impl Upcast<dyn DefDatabase> for RootDatabase
impl Upcast<dyn DefDatabase> for RootDatabase
source§impl Upcast<dyn ExpandDatabase> for RootDatabase
impl Upcast<dyn ExpandDatabase> for RootDatabase
Auto Trait Implementations§
impl RefUnwindSafe for RootDatabase
impl Send for RootDatabase
impl !Sync for RootDatabase
impl Unpin for RootDatabase
impl UnwindSafe for RootDatabase
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Cast for T
impl<T> Cast for T
§impl<DB> DefDatabase for DBwhere
DB: InternDatabase + ExpandDatabase + Upcast<dyn ExpandDatabase> + Database + HasQueryGroup<DefDatabaseStorage>,
impl<DB> DefDatabase for DBwhere
DB: InternDatabase + ExpandDatabase + Upcast<dyn ExpandDatabase> + Database + HasQueryGroup<DefDatabaseStorage>,
fn expand_proc_attr_macros(&self) -> bool
§fn set_expand_proc_attr_macros(&mut self, value__: bool)
fn set_expand_proc_attr_macros(&mut self, value__: bool)
Set the value of the
expand_proc_attr_macros input. Read more§fn set_expand_proc_attr_macros_with_durability(
&mut self,
value__: bool,
durability__: Durability
)
fn set_expand_proc_attr_macros_with_durability( &mut self, value__: bool, durability__: Durability )
Set the value of the
expand_proc_attr_macros input with a
specific durability instead of the default of
Durability::LOW. You can use Durability::MAX
to promise that its value will never change again. Read morefn file_item_tree(&self, file_id: HirFileId) -> Arc<ItemTree>
fn block_item_tree_query(&self, block_id: BlockId) -> Arc<ItemTree>
fn crate_def_map(&self, krate: Idx<CrateData>) -> Arc<DefMap>
fn crate_def_map_query(&self, krate: Idx<CrateData>) -> Arc<DefMap>
§fn block_def_map(&self, block: BlockId) -> Arc<DefMap>
fn block_def_map(&self, block: BlockId) -> Arc<DefMap>
Computes the block-level
DefMap, returning None when block doesn’t contain any inner
items directly. Read morefn struct_data(&self, id: StructId) -> Arc<StructData>
fn struct_data_with_diagnostics( &self, id: StructId ) -> (Arc<StructData>, Arc<[DefDiagnostic]>)
fn union_data(&self, id: UnionId) -> Arc<StructData>
fn union_data_with_diagnostics( &self, id: UnionId ) -> (Arc<StructData>, Arc<[DefDiagnostic]>)
fn enum_data(&self, e: EnumId) -> Arc<EnumData>
fn enum_data_with_diagnostics( &self, e: EnumId ) -> (Arc<EnumData>, Arc<[DefDiagnostic]>)
fn impl_data(&self, e: ImplId) -> Arc<ImplData>
fn impl_data_with_diagnostics( &self, e: ImplId ) -> (Arc<ImplData>, Arc<[DefDiagnostic]>)
fn trait_data(&self, e: TraitId) -> Arc<TraitData>
fn trait_data_with_diagnostics( &self, tr: TraitId ) -> (Arc<TraitData>, Arc<[DefDiagnostic]>)
fn trait_alias_data(&self, e: TraitAliasId) -> Arc<TraitAliasData>
fn type_alias_data(&self, e: TypeAliasId) -> Arc<TypeAliasData>
fn function_data(&self, func: FunctionId) -> Arc<FunctionData>
fn const_data(&self, konst: ConstId) -> Arc<ConstData>
fn static_data(&self, konst: StaticId) -> Arc<StaticData>
fn macro2_data(&self, makro: Macro2Id) -> Arc<Macro2Data>
fn macro_rules_data(&self, makro: MacroRulesId) -> Arc<MacroRulesData>
fn proc_macro_data(&self, makro: ProcMacroId) -> Arc<ProcMacroData>
fn extern_crate_decl_data( &self, extern_crate: ExternCrateId ) -> Arc<ExternCrateDeclData>
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) -> Interned<GenericParams>
fn variants_attrs( &self, def: EnumId ) -> Arc<ArenaMap<Idx<EnumVariantData>, Attrs>>
fn fields_attrs(&self, def: VariantId) -> Arc<ArenaMap<Idx<FieldData>, Attrs>>
fn variants_attrs_source_map( &self, def: EnumId ) -> Arc<ArenaMap<Idx<EnumVariantData>, AstPtr<Variant>>>
fn fields_attrs_source_map( &self, def: VariantId ) -> Arc<ArenaMap<Idx<FieldData>, Either<AstPtr<TupleField>, AstPtr<RecordField>>>>
fn attrs(&self, def: AttrDefId) -> Attrs
fn lang_attr(&self, def: AttrDefId) -> Option<LangItem>
fn attrs_with_owner(&self, def: AttrDefId) -> AttrsWithOwner
fn lang_item( &self, start_crate: Idx<CrateData>, item: LangItem ) -> Option<LangItemTarget>
fn import_map(&self, krate: Idx<CrateData>) -> Arc<ImportMap>
fn field_visibilities( &self, var: VariantId ) -> Arc<ArenaMap<Idx<FieldData>, Visibility>>
fn function_visibility(&self, def: FunctionId) -> Visibility
fn const_visibility(&self, def: ConstId) -> Visibility
fn crate_lang_items(&self, krate: Idx<CrateData>) -> Arc<LangItems>
fn crate_limits(&self, crate_id: Idx<CrateData>) -> CrateLimits
fn recursion_limit(&self, crate_id: Idx<CrateData>) -> u32
fn crate_supports_no_std(&self, crate_id: Idx<CrateData>) -> bool
§impl<DB> ExpandDatabase for DBwhere
DB: SourceDatabase + Database + HasQueryGroup<ExpandDatabaseStorage>,
impl<DB> ExpandDatabase for DBwhere
DB: SourceDatabase + Database + HasQueryGroup<ExpandDatabaseStorage>,
fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>
§fn parse_or_expand(&self, file_id: HirFileId) -> SyntaxNode<RustLanguage>
fn parse_or_expand(&self, file_id: HirFileId) -> SyntaxNode<RustLanguage>
Main public API – parses a hir file, not caring whether it’s a real
file or a macro expansion.
fn parse_or_expand_with_err( &self, file_id: HirFileId ) -> ValueResult<Parse<SyntaxNode<RustLanguage>>, ExpandError>
§fn parse_macro_expansion(
&self,
macro_file: MacroFileId
) -> ValueResult<(Parse<SyntaxNode<RustLanguage>>, Arc<SpanMap<SpanData<SpanAnchor, SyntaxContextId>>>), ExpandError>
fn parse_macro_expansion( &self, macro_file: MacroFileId ) -> ValueResult<(Parse<SyntaxNode<RustLanguage>>, Arc<SpanMap<SpanData<SpanAnchor, SyntaxContextId>>>), ExpandError>
Implementation for the macro case.
fn span_map(&self, file_id: HirFileId) -> SpanMap
fn real_span_map(&self, file_id: FileId) -> Arc<RealSpanMap>
§fn intern_macro_call(&self, macro_call: MacroCallLoc) -> MacroCallId
fn intern_macro_call(&self, macro_call: MacroCallLoc) -> MacroCallId
Macro ids. That’s probably the tricksiest bit in rust-analyzer, and the
reason why we use salsa at all. Read more
fn lookup_intern_macro_call(&self, key: MacroCallId) -> MacroCallLoc
fn intern_syntax_context(&self, ctx: SyntaxContextData) -> SyntaxContextId
fn lookup_intern_syntax_context( &self, key: SyntaxContextId ) -> SyntaxContextData
fn setup_syntax_context_root(&self)
fn dump_syntax_contexts(&self) -> String
§fn macro_arg(
&self,
id: MacroCallId
) -> ValueResult<Option<(Arc<Subtree<SpanData<SpanAnchor, SyntaxContextId>>>, SyntaxFixupUndoInfo)>, Arc<Box<[SyntaxError]>>>
fn macro_arg( &self, id: MacroCallId ) -> ValueResult<Option<(Arc<Subtree<SpanData<SpanAnchor, SyntaxContextId>>>, SyntaxFixupUndoInfo)>, Arc<Box<[SyntaxError]>>>
Lowers syntactic macro call to a token tree representation. That’s a firewall
query, only typing in the macro call itself changes the returned
subtree.
§fn macro_expander(&self, id: MacroDefId) -> TokenExpander
fn macro_expander(&self, id: MacroDefId) -> TokenExpander
Fetches the expander for this macro.
§fn decl_macro_expander(
&self,
def_crate: Idx<CrateData>,
id: InFileWrapper<HirFileId, FileAstId<Macro>>
) -> Arc<DeclarativeMacroExpander>
fn decl_macro_expander( &self, def_crate: Idx<CrateData>, id: InFileWrapper<HirFileId, FileAstId<Macro>> ) -> Arc<DeclarativeMacroExpander>
Fetches (and compiles) the expander of this decl macro.
§fn expand_proc_macro(
&self,
call: MacroCallId
) -> ValueResult<Arc<Subtree<SpanData<SpanAnchor, SyntaxContextId>>>, ExpandError>
fn expand_proc_macro( &self, call: MacroCallId ) -> ValueResult<Arc<Subtree<SpanData<SpanAnchor, SyntaxContextId>>>, ExpandError>
Special case of the previous query for procedural macros. We can’t LRU
proc macros, since they are not deterministic in general, and
non-determinism breaks salsa in a very, very, very bad way.
@edwin0cheng heroically debugged this once! See #4315 for details
§fn parse_macro_expansion_error(
&self,
macro_call: MacroCallId
) -> ValueResult<Box<[SyntaxError]>, ExpandError>
fn parse_macro_expansion_error( &self, macro_call: MacroCallId ) -> ValueResult<Box<[SyntaxError]>, ExpandError>
Firewall query that returns the errors from the
parse_macro_expansion query.§impl<DB> HirDatabase for DBwhere
DB: DefDatabase + Upcast<dyn DefDatabase> + Database + HasQueryGroup<HirDatabaseStorage>,
impl<DB> HirDatabase for DBwhere
DB: DefDatabase + Upcast<dyn DefDatabase> + Database + HasQueryGroup<HirDatabaseStorage>,
fn infer(&self, def: DefWithBodyId) -> Arc<InferenceResult>
fn infer_query(&self, def: DefWithBodyId) -> Arc<InferenceResult>
fn mir_body(&self, def: DefWithBodyId) -> Result<Arc<MirBody>, MirLowerError>
fn mir_body_for_closure( &self, def: ClosureId<Interner> ) -> Result<Arc<MirBody>, MirLowerError>
fn monomorphized_mir_body( &self, def: DefWithBodyId, subst: Substitution<Interner>, env: Arc<TraitEnvironment> ) -> Result<Arc<MirBody>, MirLowerError>
fn monomorphized_mir_body_for_closure( &self, def: ClosureId<Interner>, subst: Substitution<Interner>, env: Arc<TraitEnvironment> ) -> Result<Arc<MirBody>, MirLowerError>
fn borrowck( &self, def: DefWithBodyId ) -> Result<Arc<[BorrowckResult]>, MirLowerError>
fn ty(&self, def: TyDefId) -> Binders<Ty<Interner>>
fn value_ty(&self, def: ValueTyDefId) -> Binders<Ty<Interner>>
fn impl_self_ty(&self, def: ImplId) -> Binders<Ty<Interner>>
fn const_param_ty(&self, def: ConstParamId) -> Ty<Interner>
fn const_eval( &self, def: GeneralConstId, subst: Substitution<Interner>, trait_env: Option<Arc<TraitEnvironment>> ) -> Result<Const<Interner>, ConstEvalError>
fn const_eval_static( &self, def: StaticId ) -> Result<Const<Interner>, ConstEvalError>
fn const_eval_discriminant( &self, def: EnumVariantId ) -> Result<i128, ConstEvalError>
fn impl_trait(&self, def: ImplId) -> Option<Binders<TraitRef<Interner>>>
fn field_types( &self, var: VariantId ) -> Arc<ArenaMap<Idx<FieldData>, Binders<Ty<Interner>>>>
fn layout_of_adt( &self, def: AdtId, subst: Substitution<Interner>, env: Arc<TraitEnvironment> ) -> Result<Arc<LayoutS<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>
fn layout_of_ty( &self, ty: Ty<Interner>, env: Arc<TraitEnvironment> ) -> Result<Arc<LayoutS<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>
fn target_data_layout( &self, krate: Idx<CrateData> ) -> Option<Arc<TargetDataLayout>>
fn lookup_impl_method( &self, env: Arc<TraitEnvironment>, func: FunctionId, fn_subst: Substitution<Interner> ) -> (FunctionId, Substitution<Interner>)
fn callable_item_signature(&self, def: CallableDefId) -> Binders<CallableSig>
fn return_type_impl_traits( &self, def: FunctionId ) -> Option<Arc<Binders<ReturnTypeImplTraits>>>
fn generic_predicates_for_param( &self, def: GenericDefId, param_id: TypeOrConstParamId, assoc_name: Option<Name> ) -> Arc<[Binders<Binders<WhereClause<Interner>>>]>
fn generic_predicates( &self, def: GenericDefId ) -> Arc<[Binders<Binders<WhereClause<Interner>>>]>
fn trait_environment_for_body( &self, def: DefWithBodyId ) -> Arc<TraitEnvironment>
fn trait_environment(&self, def: GenericDefId) -> Arc<TraitEnvironment>
fn generic_defaults( &self, def: GenericDefId ) -> Arc<[Binders<GenericArg<Interner>>]>
fn inherent_impls_in_crate(&self, krate: Idx<CrateData>) -> Arc<InherentImpls>
fn inherent_impls_in_block(&self, block: BlockId) -> Arc<InherentImpls>
§fn incoherent_inherent_impl_crates(
&self,
krate: Idx<CrateData>,
fp: TyFingerprint
) -> SmallVec<[Idx<CrateData>; 2]>
fn incoherent_inherent_impl_crates( &self, krate: Idx<CrateData>, fp: TyFingerprint ) -> SmallVec<[Idx<CrateData>; 2]>
Collects all crates in the dependency graph that have impls for the
given fingerprint. This is only used for primitive types and types
annotated with
rustc_has_incoherent_inherent_impls; for other types
we just look at the crate where the type is defined.fn trait_impls_in_crate(&self, krate: Idx<CrateData>) -> Arc<TraitImpls>
fn trait_impls_in_block(&self, block: BlockId) -> Arc<TraitImpls>
fn trait_impls_in_deps(&self, krate: Idx<CrateData>) -> Arc<[Arc<TraitImpls>]>
fn intern_callable_def( &self, callable_def: CallableDefId ) -> InternedCallableDefId
fn lookup_intern_callable_def( &self, key: InternedCallableDefId ) -> CallableDefId
fn intern_type_or_const_param_id( &self, param_id: TypeOrConstParamId ) -> InternedTypeOrConstParamId
fn lookup_intern_type_or_const_param_id( &self, key: InternedTypeOrConstParamId ) -> TypeOrConstParamId
fn intern_lifetime_param_id( &self, param_id: LifetimeParamId ) -> InternedLifetimeParamId
fn lookup_intern_lifetime_param_id( &self, key: InternedLifetimeParamId ) -> LifetimeParamId
fn intern_impl_trait_id(&self, id: ImplTraitId) -> InternedOpaqueTyId
fn lookup_intern_impl_trait_id(&self, key: InternedOpaqueTyId) -> ImplTraitId
fn intern_closure(&self, id: (DefWithBodyId, Idx<Expr>)) -> InternedClosureId
fn lookup_intern_closure( &self, key: InternedClosureId ) -> (DefWithBodyId, Idx<Expr>)
fn intern_generator( &self, id: (DefWithBodyId, Idx<Expr>) ) -> InternedGeneratorId
fn lookup_intern_generator( &self, key: InternedGeneratorId ) -> (DefWithBodyId, Idx<Expr>)
fn associated_ty_data( &self, id: AssocTypeId<Interner> ) -> Arc<AssociatedTyDatum<Interner>>
fn trait_datum( &self, krate: Idx<CrateData>, trait_id: TraitId<Interner> ) -> Arc<TraitDatum<Interner>>
fn struct_datum( &self, krate: Idx<CrateData>, struct_id: AdtId<Interner> ) -> Arc<AdtDatum<Interner>>
fn impl_datum( &self, krate: Idx<CrateData>, impl_id: ImplId<Interner> ) -> Arc<ImplDatum<Interner>>
fn fn_def_datum( &self, krate: Idx<CrateData>, fn_def_id: FnDefId<Interner> ) -> Arc<FnDefDatum<Interner>>
fn fn_def_variance(&self, fn_def_id: FnDefId<Interner>) -> Variances<Interner>
fn adt_variance(&self, adt_id: AdtId<Interner>) -> Variances<Interner>
fn associated_ty_value( &self, krate: Idx<CrateData>, id: AssociatedTyValueId<Interner> ) -> Arc<AssociatedTyValue<Interner>>
fn normalize_projection( &self, projection: ProjectionTy<Interner>, env: Arc<TraitEnvironment> ) -> Ty<Interner>
fn trait_solve( &self, krate: Idx<CrateData>, block: Option<BlockId>, goal: Canonical<InEnvironment<Goal<Interner>>> ) -> Option<Solution<Interner>>
fn trait_solve_query( &self, krate: Idx<CrateData>, block: Option<BlockId>, goal: Canonical<InEnvironment<Goal<Interner>>> ) -> Option<Solution<Interner>>
fn program_clauses_for_chalk_env( &self, krate: Idx<CrateData>, block: Option<BlockId>, env: Environment<Interner> ) -> ProgramClauses<Interner>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<DB> InternDatabase for DBwhere
DB: SourceDatabase + Database + HasQueryGroup<InternDatabaseStorage>,
impl<DB> InternDatabase for DBwhere
DB: SourceDatabase + Database + HasQueryGroup<InternDatabaseStorage>,
fn intern_use(&self, loc: ItemLoc<Use>) -> UseId
fn lookup_intern_use(&self, key: UseId) -> ItemLoc<Use>
fn intern_extern_crate(&self, loc: ItemLoc<ExternCrate>) -> ExternCrateId
fn lookup_intern_extern_crate(&self, key: ExternCrateId) -> ItemLoc<ExternCrate>
fn intern_function(&self, loc: AssocItemLoc<Function>) -> FunctionId
fn lookup_intern_function(&self, key: FunctionId) -> AssocItemLoc<Function>
fn intern_struct(&self, loc: ItemLoc<Struct>) -> StructId
fn lookup_intern_struct(&self, key: StructId) -> ItemLoc<Struct>
fn intern_union(&self, loc: ItemLoc<Union>) -> UnionId
fn lookup_intern_union(&self, key: UnionId) -> ItemLoc<Union>
fn intern_enum(&self, loc: ItemLoc<Enum>) -> EnumId
fn lookup_intern_enum(&self, key: EnumId) -> ItemLoc<Enum>
fn intern_const(&self, loc: AssocItemLoc<Const>) -> ConstId
fn lookup_intern_const(&self, key: ConstId) -> AssocItemLoc<Const>
fn intern_static(&self, loc: AssocItemLoc<Static>) -> StaticId
fn lookup_intern_static(&self, key: StaticId) -> AssocItemLoc<Static>
fn intern_trait(&self, loc: ItemLoc<Trait>) -> TraitId
fn lookup_intern_trait(&self, key: TraitId) -> ItemLoc<Trait>
fn intern_trait_alias(&self, loc: ItemLoc<TraitAlias>) -> TraitAliasId
fn lookup_intern_trait_alias(&self, key: TraitAliasId) -> ItemLoc<TraitAlias>
fn intern_type_alias(&self, loc: AssocItemLoc<TypeAlias>) -> TypeAliasId
fn lookup_intern_type_alias(&self, key: TypeAliasId) -> AssocItemLoc<TypeAlias>
fn intern_impl(&self, loc: ItemLoc<Impl>) -> ImplId
fn lookup_intern_impl(&self, key: ImplId) -> ItemLoc<Impl>
fn intern_extern_block(&self, loc: ItemLoc<ExternBlock>) -> ExternBlockId
fn lookup_intern_extern_block(&self, key: ExternBlockId) -> ItemLoc<ExternBlock>
fn intern_macro2(&self, loc: Macro2Loc) -> Macro2Id
fn lookup_intern_macro2(&self, key: Macro2Id) -> Macro2Loc
fn intern_proc_macro(&self, loc: ProcMacroLoc) -> ProcMacroId
fn lookup_intern_proc_macro(&self, key: ProcMacroId) -> ProcMacroLoc
fn intern_macro_rules(&self, loc: MacroRulesLoc) -> MacroRulesId
fn lookup_intern_macro_rules(&self, key: MacroRulesId) -> MacroRulesLoc
fn intern_block(&self, loc: BlockLoc) -> BlockId
fn lookup_intern_block(&self, key: BlockId) -> BlockLoc
fn intern_anonymous_const(&self, id: ConstBlockLoc) -> ConstBlockId
fn lookup_intern_anonymous_const(&self, key: ConstBlockId) -> ConstBlockLoc
fn intern_in_type_const(&self, id: InTypeConstLoc) -> InTypeConstId
fn lookup_intern_in_type_const(&self, key: InTypeConstId) -> InTypeConstLoc
source§impl<DB> LineIndexDatabase for DBwhere
DB: SourceDatabase + Database + HasQueryGroup<LineIndexDatabaseStorage>,
impl<DB> LineIndexDatabase for DBwhere
DB: SourceDatabase + Database + HasQueryGroup<LineIndexDatabaseStorage>,
fn line_index(&self, file_id: FileId) -> Arc<LineIndex>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<DB> SourceDatabase for DB
impl<DB> SourceDatabase for DB
source§fn parse(&self, file_id: FileId) -> Parse<SourceFile>
fn parse(&self, file_id: FileId) -> Parse<SourceFile>
Parses the file into the syntax tree.
source§fn crate_graph(&self) -> Arc<CrateGraph>
fn crate_graph(&self) -> Arc<CrateGraph>
The crate graph.
source§fn set_crate_graph(&mut self, value__: Arc<CrateGraph>)
fn set_crate_graph(&mut self, value__: Arc<CrateGraph>)
Set the value of the
crate_graph input. Read moresource§fn set_crate_graph_with_durability(
&mut self,
value__: Arc<CrateGraph>,
durability__: Durability
)
fn set_crate_graph_with_durability( &mut self, value__: Arc<CrateGraph>, durability__: Durability )
Set the value of the
crate_graph input with a
specific durability instead of the default of
Durability::LOW. You can use Durability::MAX
to promise that its value will never change again. Read moresource§fn proc_macros(
&self
) -> Arc<HashMap<Idx<CrateData>, Result<Vec<ProcMacro>, String>, BuildHasherDefault<FxHasher>>>
fn proc_macros( &self ) -> Arc<HashMap<Idx<CrateData>, Result<Vec<ProcMacro>, String>, BuildHasherDefault<FxHasher>>>
The proc macros.
source§fn set_proc_macros(
&mut self,
value__: Arc<HashMap<Idx<CrateData>, Result<Vec<ProcMacro>, String>, BuildHasherDefault<FxHasher>>>
)
fn set_proc_macros( &mut self, value__: Arc<HashMap<Idx<CrateData>, Result<Vec<ProcMacro>, String>, BuildHasherDefault<FxHasher>>> )
Set the value of the
proc_macros input. Read moresource§fn set_proc_macros_with_durability(
&mut self,
value__: Arc<HashMap<Idx<CrateData>, Result<Vec<ProcMacro>, String>, BuildHasherDefault<FxHasher>>>,
durability__: Durability
)
fn set_proc_macros_with_durability( &mut self, value__: Arc<HashMap<Idx<CrateData>, Result<Vec<ProcMacro>, String>, BuildHasherDefault<FxHasher>>>, durability__: Durability )
Set the value of the
proc_macros input with a
specific durability instead of the default of
Durability::LOW. You can use Durability::MAX
to promise that its value will never change again. Read moresource§impl<DB> SourceDatabaseExt for DBwhere
DB: SourceDatabase + Database + HasQueryGroup<SourceDatabaseExtStorage>,
impl<DB> SourceDatabaseExt for DBwhere
DB: SourceDatabase + Database + HasQueryGroup<SourceDatabaseExtStorage>,
fn file_text(&self, file_id: FileId) -> Arc<str>
source§fn set_file_text(&mut self, file_id: FileId, value__: Arc<str>)
fn set_file_text(&mut self, file_id: FileId, value__: Arc<str>)
Set the value of the
file_text input. Read moresource§fn set_file_text_with_durability(
&mut self,
file_id: FileId,
value__: Arc<str>,
durability__: Durability
)
fn set_file_text_with_durability( &mut self, file_id: FileId, value__: Arc<str>, durability__: Durability )
Set the value of the
file_text input with a
specific durability instead of the default of
Durability::LOW. You can use Durability::MAX
to promise that its value will never change again. Read moresource§fn file_source_root(&self, file_id: FileId) -> SourceRootId
fn file_source_root(&self, file_id: FileId) -> SourceRootId
Path to a file, relative to the root of its source root.
Source root of the file.
source§fn set_file_source_root(&mut self, file_id: FileId, value__: SourceRootId)
fn set_file_source_root(&mut self, file_id: FileId, value__: SourceRootId)
Set the value of the
file_source_root input. Read moresource§fn set_file_source_root_with_durability(
&mut self,
file_id: FileId,
value__: SourceRootId,
durability__: Durability
)
fn set_file_source_root_with_durability( &mut self, file_id: FileId, value__: SourceRootId, durability__: Durability )
Set the value of the
file_source_root input with a
specific durability instead of the default of
Durability::LOW. You can use Durability::MAX
to promise that its value will never change again. Read moresource§fn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>
fn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>
Contents of the source root.
source§fn set_source_root(&mut self, id: SourceRootId, value__: Arc<SourceRoot>)
fn set_source_root(&mut self, id: SourceRootId, value__: Arc<SourceRoot>)
Set the value of the
source_root input. Read moresource§fn set_source_root_with_durability(
&mut self,
id: SourceRootId,
value__: Arc<SourceRoot>,
durability__: Durability
)
fn set_source_root_with_durability( &mut self, id: SourceRootId, value__: Arc<SourceRoot>, durability__: Durability )
Set the value of the
source_root input with a
specific durability instead of the default of
Durability::LOW. You can use Durability::MAX
to promise that its value will never change again. Read morefn source_root_crates( &self, id: SourceRootId ) -> Arc<HashSet<Idx<CrateData>, BuildHasherDefault<FxHasher>>>
source§impl<DB> SymbolsDatabase for DBwhere
DB: HirDatabase + SourceDatabaseExt + Upcast<dyn HirDatabase> + Database + HasQueryGroup<SymbolsDatabaseStorage>,
impl<DB> SymbolsDatabase for DBwhere
DB: HirDatabase + SourceDatabaseExt + Upcast<dyn HirDatabase> + Database + HasQueryGroup<SymbolsDatabaseStorage>,
source§fn module_symbols(&self, module: Module) -> Arc<SymbolIndex>
fn module_symbols(&self, module: Module) -> Arc<SymbolIndex>
The symbol index for a given module. These modules should only be in source roots that
are inside local_roots.
source§fn library_symbols(&self, source_root_id: SourceRootId) -> Arc<SymbolIndex>
fn library_symbols(&self, source_root_id: SourceRootId) -> Arc<SymbolIndex>
The symbol index for a given source root within library_roots.
source§fn crate_symbols(&self, krate: Crate) -> Box<[Arc<SymbolIndex>]>
fn crate_symbols(&self, krate: Crate) -> Box<[Arc<SymbolIndex>]>
The symbol indices of modules that make up a given crate.
source§fn local_roots(
&self
) -> Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>
fn local_roots( &self ) -> Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>
The set of “local” (that is, from the current workspace) roots.
Files in local roots are assumed to change frequently.
source§fn set_local_roots(
&mut self,
value__: Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>
)
fn set_local_roots( &mut self, value__: Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>> )
Set the value of the
local_roots input. Read moresource§fn set_local_roots_with_durability(
&mut self,
value__: Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>,
durability__: Durability
)
fn set_local_roots_with_durability( &mut self, value__: Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>, durability__: Durability )
Set the value of the
local_roots input with a
specific durability instead of the default of
Durability::LOW. You can use Durability::MAX
to promise that its value will never change again. Read moresource§fn library_roots(
&self
) -> Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>
fn library_roots( &self ) -> Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>
The set of roots for crates.io libraries.
Files in libraries are assumed to never change.
source§fn set_library_roots(
&mut self,
value__: Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>
)
fn set_library_roots( &mut self, value__: Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>> )
Set the value of the
library_roots input. Read moresource§fn set_library_roots_with_durability(
&mut self,
value__: Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>,
durability__: Durability
)
fn set_library_roots_with_durability( &mut self, value__: Arc<HashSet<SourceRootId, BuildHasherDefault<FxHasher>>>, durability__: Durability )
Set the value of the
library_roots input with a
specific durability instead of the default of
Durability::LOW. You can use Durability::MAX
to promise that its value will never change again. Read more