ide

Struct RootDatabase

pub struct RootDatabase { /* private fields */ }

Implementations§

§

impl RootDatabase

pub fn request_cancellation(&mut self)

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

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

§

impl RootDatabase

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

pub fn enable_proc_attr_macros(&mut self)

pub fn update_base_query_lru_capacities(&mut self, _lru_capacity: Option<u16>)

pub fn update_lru_capacities( &mut self, _lru_capacities: &HashMap<Box<str>, u16, FxBuildHasher>, )

pub fn snapshot(&self) -> RootDatabase

Trait Implementations§

§

impl Clone for RootDatabase

§

fn clone(&self) -> RootDatabase

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Database for RootDatabase

§

fn salsa_event(&self, _event: &dyn Fn() -> Event)

This function is invoked by the salsa runtime at various points during execution. You can customize what happens by implementing the [UserData][] trait. By default, the event is logged at level debug using tracing facade. Read more
§

fn trigger_lru_eviction(&mut self)

Enforces current LRU limits, evicting entries if necessary. Read more
§

fn synthetic_write(&mut self, durability: Durability)

A “synthetic write” causes the system to act as though some input of durability durability has changed, triggering a new revision. This is mostly useful for profiling scenarios. Read more
§

fn report_untracked_read(&self)

Reports that the query depends on some state unknown to salsa. Read more
§

fn ingredient_debug_name( &self, ingredient_index: IngredientIndex, ) -> Cow<'_, str>

Return the “debug name” (i.e., the struct name, etc) for an “ingredient”, which are the fine-grained components we use to track data. This is intended for debugging and the contents of the returned string are not semver-guaranteed. Read more
§

fn unwind_if_revision_cancelled(&self)

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

fn attach<R>(&self, op: impl FnOnce(&Self) -> R) -> R
where Self: Sized,

Execute op with the database in thread-local storage for debug print-outs.
§

impl Debug for RootDatabase

§

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

Formats the value using the given formatter. Read more
§

impl Default for RootDatabase

§

fn default() -> RootDatabase

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

impl Drop for RootDatabase

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl HasStorage for RootDatabase

§

fn storage(&self) -> &Storage<RootDatabase>

§

fn storage_mut(&mut self) -> &mut Storage<RootDatabase>

§

impl SourceDatabase for RootDatabase

§

fn source_root(&self, source_root_id: SourceRootId) -> SourceRootInput

Source root of the file.

§

fn file_text(&self, file_id: FileId) -> FileText

Text of the file.
§

fn set_file_text(&mut self, file_id: FileId, text: &str)

§

fn set_file_text_with_durability( &mut self, file_id: FileId, text: &str, durability: Durability, )

§

fn set_source_root_with_durability( &mut self, source_root_id: SourceRootId, source_root: Arc<SourceRoot>, durability: Durability, )

Source root of the file.
§

fn file_source_root(&self, id: FileId) -> FileSourceRootInput

§

fn set_file_source_root_with_durability( &mut self, id: FileId, source_root_id: SourceRootId, durability: Durability, )

§

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

§

impl Upcast<dyn DefDatabase> for RootDatabase

§

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

§

impl Upcast<dyn ExpandDatabase> for RootDatabase

§

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

§

impl Upcast<dyn HirDatabase> for RootDatabase

§

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

§

impl Upcast<dyn RootQueryDb> for RootDatabase

§

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

§

impl Upcast<dyn SourceDatabase> for RootDatabase

§

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

§

impl RefUnwindSafe for RootDatabase

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
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

§

impl<T> AsDynDatabase for T
where T: Database,

§

fn as_dyn_database(&self) -> &(dyn Database + 'static)

§

fn as_dyn_database_mut(&mut self) -> &mut (dyn Database + 'static)

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.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

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

§

fn expand_proc_attr_macros(&self) -> bool

§

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

§

fn block_item_tree(&self, block_id: BlockId) -> Arc<ItemTree>

§

fn file_item_tree_with_source_map( &self, file_id: HirFileId, ) -> (Arc<ItemTree>, Arc<ItemTreeSourceMaps>)

§

fn block_item_tree_with_source_map( &self, block_id: BlockId, ) -> (Arc<ItemTree>, Arc<ItemTreeSourceMaps>)

§

fn crate_local_def_map(&self, krate: Crate) -> (Arc<DefMap>, Arc<LocalDefMap>)

§

fn crate_def_map(&self, krate: Crate) -> Arc<DefMap>

§

fn block_def_map(&self, block: BlockId) -> Arc<DefMap>

§

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

§

fn variant_data(&self, id: VariantId) -> Arc<VariantData>

§

fn variant_data_with_diagnostics( &self, id: VariantId, ) -> (Arc<VariantData>, DefDiagnostics)

§

fn struct_data(&self, id: StructId) -> Arc<StructData>

§

fn union_data(&self, id: UnionId) -> Arc<StructData>

§

fn enum_data(&self, e: EnumId) -> Arc<EnumData>

§

fn enum_variants(&self, e: EnumId) -> Arc<EnumVariants>

§

fn enum_variant_data(&self, id: EnumVariantId) -> Arc<EnumVariantData>

§

fn impl_data(&self, e: ImplId) -> Arc<ImplData>

§

fn impl_items(&self, e: ImplId) -> Arc<ImplItems>

§

fn impl_items_with_diagnostics( &self, e: ImplId, ) -> (Arc<ImplItems>, DefDiagnostics)

§

fn trait_data(&self, e: TraitId) -> Arc<TraitData>

§

fn trait_items(&self, e: TraitId) -> Arc<TraitItems>

§

fn trait_items_with_diagnostics( &self, tr: TraitId, ) -> (Arc<TraitItems>, DefDiagnostics)

§

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, statik: 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) -> Arc<GenericParams>

§

fn generic_params_with_source_map( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Option<Arc<TypesSourceMap>>)

§

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

§

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

§

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

§

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

§

fn lang_item( &self, start_crate: Crate, item: LangItem, ) -> Option<LangItemTarget>

§

fn import_map(&self, krate: Crate) -> 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: Crate) -> Option<Arc<LangItems>>

§

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

§

impl<DB> ExpandDatabase for DB
where DB: RootQueryDb,

§

fn proc_macros(&self) -> Arc<ProcMacros>

§

fn proc_macros_for_crate(&self, krate: Crate) -> Option<Arc<CrateProcMacros>>

§

fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>

§

fn parse_or_expand(&self, file_id: HirFileId) -> SyntaxNode<RustLanguage>

§

fn parse_macro_expansion( &self, macro_file: MacroFileId, ) -> ValueResult<(Parse<SyntaxNode<RustLanguage>>, Arc<SpanMap<SyntaxContext>>), ExpandError>

§

fn span_map(&self, file_id: HirFileId) -> SpanMap

§

fn expansion_span_map( &self, file_id: MacroFileId, ) -> Arc<SpanMap<SyntaxContext>>

§

fn real_span_map(&self, file_id: EditionedFileId) -> Arc<RealSpanMap>

§

fn intern_macro_call(&self, macro_call: MacroCallLoc) -> MacroCallId

§

fn lookup_intern_macro_call(&self, macro_call: MacroCallId) -> MacroCallLoc

§

fn macro_arg( &self, id: MacroCallId, ) -> (Arc<TopSubtree<SpanData<SyntaxContext>>>, SyntaxFixupUndoInfo, SpanData<SyntaxContext>)

§

fn macro_arg_considering_derives( &self, id: MacroCallId, kind: &MacroCallKind, ) -> (Arc<TopSubtree<SpanData<SyntaxContext>>>, SyntaxFixupUndoInfo, SpanData<SyntaxContext>)

§

fn macro_expander(&self, id: MacroDefId) -> TokenExpander

§

fn decl_macro_expander( &self, def_crate: Crate, id: InFileWrapper<HirFileId, FileAstId<Macro>>, ) -> Arc<DeclarativeMacroExpander>

§

fn expand_proc_macro( &self, call: MacroCallId, ) -> ValueResult<Arc<TopSubtree<SpanData<SyntaxContext>>>, ExpandError>

§

fn proc_macro_span( &self, fun: InFileWrapper<HirFileId, FileAstId<Fn>>, ) -> SpanData<SyntaxContext>

§

fn parse_macro_expansion_error( &self, macro_call: MacroCallId, ) -> Option<Arc<ValueResult<Arc<[SyntaxError]>, ExpandError>>>

§

fn syntax_context(&self, file: HirFileId, edition: Edition) -> SyntaxContext

§

fn set_proc_macros(&mut self, __value: Arc<ProcMacros>)

§

fn set_proc_macros_with_durability( &mut self, __value: Arc<ProcMacros>, durability: Durability, )

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> + Debug,

§

fn infer(&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 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 lookup_impl_method( &self, env: Arc<TraitEnvironment>, func: FunctionId, fn_subst: Substitution<Interner>, ) -> (FunctionId, Substitution<Interner>)

§

fn layout_of_adt( &self, def: AdtId, subst: Substitution<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>

§

fn layout_of_ty( &self, ty: Ty<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>

§

fn target_data_layout( &self, krate: Crate, ) -> Result<Arc<TargetDataLayout>, Arc<str>>

§

fn dyn_compatibility_of_trait( &self, trait_: TraitId, ) -> Option<DynCompatibilityViolation>

§

fn ty(&self, def: TyDefId) -> Binders<Ty<Interner>>

§

fn type_for_type_alias_with_diagnostics( &self, def: TypeAliasId, ) -> (Binders<Ty<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

§

fn value_ty(&self, def: ValueTyDefId) -> Option<Binders<Ty<Interner>>>

§

fn impl_self_ty_with_diagnostics( &self, def: ImplId, ) -> (Binders<Ty<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

§

fn impl_self_ty(&self, def: ImplId) -> Binders<Ty<Interner>>

§

fn const_param_ty_with_diagnostics( &self, def: ConstParamId, ) -> (Ty<Interner>, Option<ThinArc<(), TyLoweringDiagnostic>>)

§

fn const_param_ty(&self, def: ConstParamId) -> Ty<Interner>

§

fn impl_trait_with_diagnostics( &self, def: ImplId, ) -> Option<(Binders<TraitRef<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)>

§

fn impl_trait(&self, def: ImplId) -> Option<Binders<TraitRef<Interner>>>

§

fn field_types_with_diagnostics( &self, var: VariantId, ) -> (Arc<ArenaMap<Idx<FieldData>, Binders<Ty<Interner>>>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

§

fn field_types( &self, var: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, Binders<Ty<Interner>>>>

§

fn callable_item_signature(&self, def: CallableDefId) -> Binders<CallableSig>

§

fn return_type_impl_traits( &self, def: FunctionId, ) -> Option<Arc<Binders<ImplTraits>>>

§

fn type_alias_impl_traits( &self, def: TypeAliasId, ) -> Option<Arc<Binders<ImplTraits>>>

§

fn generic_predicates_for_param( &self, def: GenericDefId, param_id: TypeOrConstParamId, assoc_name: Option<Name>, ) -> GenericPredicates

§

fn generic_predicates(&self, def: GenericDefId) -> GenericPredicates

§

fn generic_predicates_without_parent_with_diagnostics( &self, def: GenericDefId, ) -> (GenericPredicates, Option<ThinArc<(), TyLoweringDiagnostic>>)

§

fn generic_predicates_without_parent( &self, def: GenericDefId, ) -> GenericPredicates

§

fn trait_environment_for_body( &self, def: DefWithBodyId, ) -> Arc<TraitEnvironment>

§

fn trait_environment(&self, def: GenericDefId) -> Arc<TraitEnvironment>

§

fn generic_defaults_with_diagnostics( &self, def: GenericDefId, ) -> (GenericDefaults, Option<ThinArc<(), TyLoweringDiagnostic>>)

§

fn generic_defaults(&self, def: GenericDefId) -> GenericDefaults

§

fn inherent_impls_in_crate(&self, krate: Crate) -> Arc<InherentImpls>

§

fn inherent_impls_in_block(&self, block: BlockId) -> Option<Arc<InherentImpls>>

§

fn incoherent_inherent_impl_crates( &self, krate: Crate, fp: TyFingerprint, ) -> SmallVec<[Crate; 2]>

§

fn trait_impls_in_crate(&self, krate: Crate) -> Arc<TraitImpls>

§

fn trait_impls_in_block(&self, block: BlockId) -> Option<Arc<TraitImpls>>

§

fn trait_impls_in_deps(&self, krate: Crate) -> Arc<[Arc<TraitImpls>]>

§

fn intern_callable_def( &self, callable_def: CallableDefId, ) -> InternedCallableDefId

§

fn intern_type_or_const_param_id( &self, param_id: TypeOrConstParamId, ) -> InternedTypeOrConstParamId

§

fn intern_lifetime_param_id( &self, param_id: LifetimeParamId, ) -> InternedLifetimeParamId

§

fn intern_impl_trait_id(&self, id: ImplTraitId) -> InternedOpaqueTyId

§

fn intern_closure(&self, id: InternedClosure) -> InternedClosureId

§

fn intern_coroutine(&self, id: InternedCoroutine) -> InternedCoroutineId

§

fn associated_ty_data( &self, id: AssocTypeId<Interner>, ) -> Arc<AssociatedTyDatum<Interner>>

§

fn trait_datum( &self, krate: Crate, trait_id: TraitId<Interner>, ) -> Arc<TraitDatum<Interner>>

§

fn adt_datum( &self, krate: Crate, struct_id: AdtId<Interner>, ) -> Arc<AdtDatum<Interner>>

§

fn impl_datum( &self, krate: Crate, impl_id: ImplId<Interner>, ) -> Arc<ImplDatum<Interner>>

§

fn fn_def_datum( &self, 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 variances_of(&self, def: GenericDefId) -> Option<Arc<[Variance]>>

§

fn associated_ty_value( &self, krate: Crate, id: AssociatedTyValueId<Interner>, ) -> Arc<AssociatedTyValue<Interner>>

§

fn normalize_projection( &self, projection: ProjectionTy<Interner>, env: Arc<TraitEnvironment>, ) -> Ty<Interner>

§

fn trait_solve( &self, krate: Crate, block: Option<BlockId>, goal: Canonical<InEnvironment<Goal<Interner>>>, ) -> Option<Solution<Interner>>

§

fn program_clauses_for_chalk_env( &self, krate: Crate, block: Option<BlockId>, env: Environment<Interner>, ) -> ProgramClauses<Interner>

§

fn has_drop_glue( &self, ty: Ty<Interner>, env: Arc<TraitEnvironment>, ) -> DropGlue

§

fn lookup_intern_callable_def(&self, id: InternedCallableDefId) -> CallableDefId

§

fn lookup_intern_type_or_const_param_id( &self, id: InternedTypeOrConstParamId, ) -> TypeOrConstParamId

§

fn lookup_intern_lifetime_param_id( &self, id: InternedLifetimeParamId, ) -> LifetimeParamId

§

fn lookup_intern_impl_trait_id(&self, id: InternedOpaqueTyId) -> ImplTraitId

§

fn lookup_intern_closure(&self, id: InternedClosureId) -> InternedClosure

§

fn lookup_intern_coroutine(&self, id: InternedCoroutineId) -> InternedCoroutine

§

impl<T> Instrument for T

§

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

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

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: RootQueryDb,

§

fn intern_use(&self, loc: ItemLoc<Use>) -> UseId

§

fn intern_extern_crate(&self, loc: ItemLoc<ExternCrate>) -> ExternCrateId

§

fn intern_function(&self, loc: AssocItemLoc<Function>) -> FunctionId

§

fn intern_struct(&self, loc: ItemLoc<Struct>) -> StructId

§

fn intern_union(&self, loc: ItemLoc<Union>) -> UnionId

§

fn intern_enum(&self, loc: ItemLoc<Enum>) -> EnumId

§

fn intern_enum_variant(&self, loc: EnumVariantLoc) -> EnumVariantId

§

fn intern_const(&self, loc: AssocItemLoc<Const>) -> ConstId

§

fn intern_static(&self, loc: AssocItemLoc<Static>) -> StaticId

§

fn intern_trait(&self, loc: ItemLoc<Trait>) -> TraitId

§

fn intern_trait_alias(&self, loc: ItemLoc<TraitAlias>) -> TraitAliasId

§

fn intern_type_alias(&self, loc: AssocItemLoc<TypeAlias>) -> TypeAliasId

§

fn intern_impl(&self, loc: ItemLoc<Impl>) -> ImplId

§

fn intern_extern_block(&self, loc: ItemLoc<ExternBlock>) -> ExternBlockId

§

fn intern_macro2(&self, loc: Macro2Loc) -> Macro2Id

§

fn intern_proc_macro(&self, loc: ProcMacroLoc) -> ProcMacroId

§

fn intern_macro_rules(&self, loc: MacroRulesLoc) -> MacroRulesId

§

fn intern_block(&self, loc: BlockLoc) -> BlockId

§

fn intern_anonymous_const(&self, id: ConstBlockLoc) -> ConstBlockId

§

fn intern_in_type_const(&self, id: InTypeConstLoc) -> InTypeConstId

§

fn lookup_intern_use(&self, id: UseId) -> ItemLoc<Use>

§

fn lookup_intern_extern_crate(&self, id: ExternCrateId) -> ItemLoc<ExternCrate>

§

fn lookup_intern_function(&self, id: FunctionId) -> AssocItemLoc<Function>

§

fn lookup_intern_struct(&self, id: StructId) -> ItemLoc<Struct>

§

fn lookup_intern_union(&self, id: UnionId) -> ItemLoc<Union>

§

fn lookup_intern_enum(&self, id: EnumId) -> ItemLoc<Enum>

§

fn lookup_intern_enum_variant(&self, id: EnumVariantId) -> EnumVariantLoc

§

fn lookup_intern_const(&self, id: ConstId) -> AssocItemLoc<Const>

§

fn lookup_intern_static(&self, id: StaticId) -> AssocItemLoc<Static>

§

fn lookup_intern_trait(&self, id: TraitId) -> ItemLoc<Trait>

§

fn lookup_intern_trait_alias(&self, id: TraitAliasId) -> ItemLoc<TraitAlias>

§

fn lookup_intern_type_alias(&self, id: TypeAliasId) -> AssocItemLoc<TypeAlias>

§

fn lookup_intern_impl(&self, id: ImplId) -> ItemLoc<Impl>

§

fn lookup_intern_extern_block(&self, id: ExternBlockId) -> ItemLoc<ExternBlock>

§

fn lookup_intern_macro2(&self, id: Macro2Id) -> Macro2Loc

§

fn lookup_intern_proc_macro(&self, id: ProcMacroId) -> ProcMacroLoc

§

fn lookup_intern_macro_rules(&self, id: MacroRulesId) -> MacroRulesLoc

§

fn lookup_intern_block(&self, id: BlockId) -> BlockLoc

§

fn lookup_intern_anonymous_const(&self, id: ConstBlockId) -> ConstBlockLoc

§

fn lookup_intern_in_type_const(&self, id: 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.

§

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

§

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

Convert self into the appropriate boxed form.
§

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

§

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

Convert self into the appropriate boxed form.
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<DB> LineIndexDatabase for DB
where DB: RootQueryDb,

§

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

§

impl<T> Lookup<T> for T

§

fn into_owned(self) -> T

§

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
§

impl<DB> RootQueryDb for DB
where DB: SourceDatabase + Database,

§

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

§

fn parse_errors(&self, file_id: EditionedFileId) -> Option<Arc<[SyntaxError]>>

§

fn toolchain_channel(&self, krate: Crate) -> Option<ReleaseChannel>

§

fn source_root_crates(&self, id: SourceRootId) -> Arc<[Crate]>

§

fn relevant_crates(&self, file_id: FileId) -> Arc<[Crate]>

§

fn all_crates(&self) -> Arc<Box<[Crate]>>

§

fn transitive_deps(&self, crate_id: Crate) -> HashSet<Crate, FxBuildHasher>

§

fn transitive_rev_deps(&self, of: Crate) -> HashSet<Crate, FxBuildHasher>

§

fn set_all_crates(&mut self, __value: Arc<Box<[Crate]>>)

§

fn set_all_crates_with_durability( &mut self, __value: Arc<Box<[Crate]>>, durability: Durability, )

§

impl<DB> SymbolsDatabase for DB
where DB: HirDatabase + SourceDatabase + Upcast<dyn HirDatabase>,

§

fn module_symbols(&self, module: Module) -> Arc<SymbolIndex>

§

fn library_symbols(&self, source_root_id: SourceRootId) -> Arc<SymbolIndex>

§

fn crate_symbols(&self, krate: Crate) -> Box<[Arc<SymbolIndex>]>

§

fn local_roots(&self) -> Arc<HashSet<SourceRootId, FxBuildHasher>>

§

fn library_roots(&self) -> Arc<HashSet<SourceRootId, FxBuildHasher>>

§

fn set_local_roots( &mut self, __value: Arc<HashSet<SourceRootId, FxBuildHasher>>, )

§

fn set_local_roots_with_durability( &mut self, __value: Arc<HashSet<SourceRootId, FxBuildHasher>>, durability: Durability, )

§

fn set_library_roots( &mut self, __value: Arc<HashSet<SourceRootId, FxBuildHasher>>, )

§

fn set_library_roots_with_durability( &mut self, __value: Arc<HashSet<SourceRootId, FxBuildHasher>>, durability: Durability, )

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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

Source§

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

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ZalsaDatabase for T
where T: HasStorage,

§

fn zalsa(&self) -> &Zalsa

§

fn zalsa_mut(&mut self) -> &mut Zalsa

§

fn zalsa_local(&self) -> &ZalsaLocal

§

fn fork_db(&self) -> Box<dyn Database>

§

impl<'a, T> Captures<'a> for T
where T: ?Sized,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T