pub struct RootDatabase { /* private fields */ }

Implementations§

source§

impl RootDatabase

source

pub fn request_cancellation(&mut self)

source

pub fn apply_change(&mut self, change: Change)

source

pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes, usize)>

source§

impl RootDatabase

source

pub fn new(lru_capacity: Option<usize>) -> RootDatabase

source

pub fn enable_proc_attr_macros(&mut self)

source

pub fn update_parse_query_lru_capacity(&mut self, lru_capacity: Option<usize>)

source

pub fn update_lru_capacities( &mut self, lru_capacities: &FxHashMap<Box<str>, usize> )

Trait Implementations§

source§

impl Database for RootDatabase

§

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)

Starts unwinding the stack if the current revision is cancelled. Read more
§

fn salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime. Read more
§

fn salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime. Read more
source§

impl DatabaseOps for RootDatabase

source§

fn ops_database(&self) -> &dyn Database

Upcast this type to a dyn Database.
source§

fn ops_salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime.
source§

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

Formats a database key index in a human readable fashion.
source§

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

Find the CycleRecoveryStrategy for a given input.
source§

fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))

Executes the callback for each kind of query.
source§

impl DatabaseStorageTypes for RootDatabase

§

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

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RootDatabase

source§

fn default() -> RootDatabase

Returns the “default value” for a type. Read more
source§

impl Drop for RootDatabase

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl FileLoader for RootDatabase

source§

fn file_text(&self, file_id: FileId) -> Arc<str>

Text of the file.
source§

fn resolve_path(&self, path: AnchoredPath<'_>) -> Option<FileId>

source§

fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>>

source§

impl HasQueryGroup<DefDatabaseStorage> for RootDatabase

source§

fn group_storage(&self) -> &<DefDatabaseStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<ExpandDatabaseStorage> for RootDatabase

source§

fn group_storage(&self) -> &<ExpandDatabaseStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<HirDatabaseStorage> for RootDatabase

source§

fn group_storage(&self) -> &<HirDatabaseStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<InternDatabaseStorage> for RootDatabase

source§

fn group_storage(&self) -> &<InternDatabaseStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<LineIndexDatabaseStorage> for RootDatabase

source§

fn group_storage( &self ) -> &<LineIndexDatabaseStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<SourceDatabaseExtStorage> for RootDatabase

source§

fn group_storage( &self ) -> &<SourceDatabaseExtStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<SourceDatabaseStorage> for RootDatabase

source§

fn group_storage(&self) -> &<SourceDatabaseStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<SymbolsDatabaseStorage> for RootDatabase

source§

fn group_storage(&self) -> &<SymbolsDatabaseStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl ParallelDatabase for RootDatabase

source§

fn snapshot(&self) -> Snapshot<RootDatabase>

Creates a second handle to the database that holds the database fixed at a particular revision. So long as this “frozen” handle exists, any attempt to set an input will block. Read more
source§

impl Upcast<dyn DefDatabase> for RootDatabase

source§

fn upcast(&self) -> &(dyn DefDatabase + 'static)

source§

impl Upcast<dyn ExpandDatabase> for RootDatabase

source§

fn upcast(&self) -> &(dyn ExpandDatabase + 'static)

source§

impl Upcast<dyn HirDatabase> for RootDatabase

source§

fn upcast(&self) -> &(dyn HirDatabase + 'static)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Cast for T

§

fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U
where Self: CastTo<U>, U: HasInterner,

Cast a value to type U using CastTo.
§

impl<DB> DefDatabase for DB
where 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)

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 )

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 more
§

fn 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>

Computes the block-level DefMap, returning None when block doesn’t contain any inner items directly. Read more
§

fn 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 DB
where 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>

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>

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

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]>>>

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

Fetches the expander for this macro.
§

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>

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>

Firewall query that returns the errors from the parse_macro_expansion query.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<DB> HirDatabase for DB
where 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]>

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

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<DB> InternDatabase for DB
where 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<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoBox<dyn Any> for T
where T: Any,

source§

fn into_box(self) -> Box<dyn Any>

Convert self into the appropriate boxed form.
source§

impl<T> IntoBox<dyn Any + Send> for T
where T: Any + Send,

source§

fn into_box(self) -> Box<dyn Any + Send>

Convert self into the appropriate boxed form.
source§

impl<DB> LineIndexDatabase for DB
where DB: SourceDatabase + Database + HasQueryGroup<LineIndexDatabaseStorage>,

source§

fn line_index(&self, file_id: FileId) -> Arc<LineIndex>

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<DB> SourceDatabase for DB
where DB: FileLoader + Debug + Database + HasQueryGroup<SourceDatabaseStorage>,

source§

fn parse(&self, file_id: FileId) -> Parse<SourceFile>

Parses the file into the syntax tree.
source§

fn crate_graph(&self) -> Arc<CrateGraph>

The crate graph.
source§

fn set_crate_graph(&mut self, value__: Arc<CrateGraph>)

Set the value of the crate_graph input. Read more
source§

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 more
source§

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>>> )

Set the value of the proc_macros input. Read more
source§

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 more
source§

impl<DB> SourceDatabaseExt for DB
where DB: SourceDatabase + Database + HasQueryGroup<SourceDatabaseExtStorage>,

source§

fn file_text(&self, file_id: FileId) -> Arc<str>

source§

fn set_file_text(&mut self, file_id: FileId, value__: Arc<str>)

Set the value of the file_text input. Read more
source§

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 more
source§

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)

Set the value of the file_source_root input. Read more
source§

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 more
source§

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>)

Set the value of the source_root input. Read more
source§

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 more
source§

fn source_root_crates( &self, id: SourceRootId ) -> Arc<HashSet<Idx<CrateData>, BuildHasherDefault<FxHasher>>>

source§

impl<DB> SymbolsDatabase for DB
where DB: HirDatabase + SourceDatabaseExt + Upcast<dyn HirDatabase> + Database + HasQueryGroup<SymbolsDatabaseStorage>,

source§

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>

The symbol index for a given source root within library_roots.
source§

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>>>

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>>> )

Set the value of the local_roots input. Read more
source§

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 more
source§

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>>> )

Set the value of the library_roots input. Read more
source§

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
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<DB> WithFixture for DB
where DB: SourceDatabaseExt + Default + 'static,

source§

fn with_single_file(ra_fixture: &str) -> (Self, FileId)

source§

fn with_many_files(ra_fixture: &str) -> (Self, Vec<FileId>)

source§

fn with_files(ra_fixture: &str) -> Self

source§

fn with_files_extra_proc_macros( ra_fixture: &str, proc_macros: Vec<(String, ProcMacro)> ) -> Self

source§

fn with_position(ra_fixture: &str) -> (Self, FilePosition)

source§

fn with_range(ra_fixture: &str) -> (Self, FileRange)

source§

fn with_range_or_offset(ra_fixture: &str) -> (Self, FileId, RangeOrOffset)

source§

fn test_crate(&self) -> Idx<CrateData>

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more