Struct ra_ap_ide_db::RootDatabase
source · [−]pub struct RootDatabase { /* private fields */ }
Implementations
sourceimpl 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)>
sourceimpl RootDatabase
impl RootDatabase
pub fn new(lru_capacity: Option<usize>) -> RootDatabase
pub fn update_lru_capacity(&mut self, lru_capacity: Option<usize>)
Trait Implementations
sourceimpl 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. Read more
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
sourceimpl DatabaseOps for RootDatabase
impl DatabaseOps for RootDatabase
sourcefn ops_database(&self) -> &dyn Database
fn ops_database(&self) -> &dyn Database
Upcast this type to a dyn Database
.
sourcefn ops_salsa_runtime(&self) -> &Runtime
fn ops_salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime.
sourcefn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
Gives access to the underlying salsa runtime.
sourcefn 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.
sourcefn maybe_changed_since(
&self,
input: DatabaseKeyIndex,
revision: Revision
) -> bool
fn maybe_changed_since(
&self,
input: DatabaseKeyIndex,
revision: Revision
) -> bool
True if the computed value for input
may have changed since revision
.
sourcefn 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.
sourceimpl 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. Read more
sourceimpl Debug for RootDatabase
impl Debug for RootDatabase
sourceimpl Default for RootDatabase
impl Default for RootDatabase
sourcefn default() -> RootDatabase
fn default() -> RootDatabase
Returns the “default value” for a type. Read more
sourceimpl Drop for RootDatabase
impl Drop for RootDatabase
sourceimpl FileLoader for RootDatabase
impl FileLoader for RootDatabase
sourceimpl HasQueryGroup<AstDatabaseStorage> for RootDatabase
impl HasQueryGroup<AstDatabaseStorage> for RootDatabase
sourcefn group_storage(&self) -> &<AstDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<AstDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
sourceimpl HasQueryGroup<DefDatabaseStorage> for RootDatabase
impl HasQueryGroup<DefDatabaseStorage> for RootDatabase
sourcefn group_storage(&self) -> &<DefDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<DefDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
sourceimpl HasQueryGroup<HirDatabaseStorage> for RootDatabase
impl HasQueryGroup<HirDatabaseStorage> for RootDatabase
sourcefn group_storage(&self) -> &<HirDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<HirDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
sourceimpl HasQueryGroup<InternDatabaseStorage> for RootDatabase
impl HasQueryGroup<InternDatabaseStorage> for RootDatabase
sourcefn group_storage(&self) -> &<InternDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<InternDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
sourceimpl HasQueryGroup<LineIndexDatabaseStorage> for RootDatabase
impl HasQueryGroup<LineIndexDatabaseStorage> for RootDatabase
sourcefn group_storage(
&self
) -> &<LineIndexDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(
&self
) -> &<LineIndexDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
sourceimpl HasQueryGroup<SourceDatabaseExtStorage> for RootDatabase
impl HasQueryGroup<SourceDatabaseExtStorage> for RootDatabase
sourcefn group_storage(
&self
) -> &<SourceDatabaseExtStorage as QueryGroup>::GroupStorage
fn group_storage(
&self
) -> &<SourceDatabaseExtStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
sourceimpl HasQueryGroup<SourceDatabaseStorage> for RootDatabase
impl HasQueryGroup<SourceDatabaseStorage> for RootDatabase
sourcefn group_storage(&self) -> &<SourceDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<SourceDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
sourceimpl HasQueryGroup<SymbolsDatabaseStorage> for RootDatabase
impl HasQueryGroup<SymbolsDatabaseStorage> for RootDatabase
sourcefn group_storage(&self) -> &<SymbolsDatabaseStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<SymbolsDatabaseStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
sourceimpl ParallelDatabase for RootDatabase
impl ParallelDatabase for RootDatabase
sourcefn snapshot(&self) -> Snapshot<RootDatabase>
fn snapshot(&self) -> Snapshot<RootDatabase>
sourceimpl Upcast<dyn AstDatabase + 'static> for RootDatabase
impl Upcast<dyn AstDatabase + 'static> for RootDatabase
sourceimpl Upcast<dyn DefDatabase + 'static> for RootDatabase
impl Upcast<dyn DefDatabase + 'static> for RootDatabase
sourceimpl Upcast<dyn HirDatabase + 'static> for RootDatabase
impl Upcast<dyn HirDatabase + 'static> 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
impl<DB> AstDatabase for DB where
DB: SourceDatabase + Database + HasQueryGroup<AstDatabaseStorage>,
impl<DB> AstDatabase for DB where
DB: SourceDatabase + Database + HasQueryGroup<AstDatabaseStorage>,
fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>
fn parse_or_expand(
&self,
file_id: HirFileId
) -> Option<SyntaxNode<RustLanguage>>
fn parse_or_expand(
&self,
file_id: HirFileId
) -> Option<SyntaxNode<RustLanguage>>
Main public API – parses a hir file, not caring whether it’s a real file or a macro expansion. Read more
fn parse_macro_expansion(
&self,
macro_file: MacroFile
) -> ValueResult<Option<(Parse<SyntaxNode<RustLanguage>>, Arc<TokenMap>)>, ExpandError>
fn parse_macro_expansion(
&self,
macro_file: MacroFile
) -> ValueResult<Option<(Parse<SyntaxNode<RustLanguage>>, Arc<TokenMap>)>, ExpandError>
Implementation for the macro case.
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 macro_arg(
&self,
id: MacroCallId
) -> Option<Arc<(Subtree, TokenMap, SyntaxFixupUndoInfo)>>
fn macro_arg(
&self,
id: MacroCallId
) -> Option<Arc<(Subtree, TokenMap, SyntaxFixupUndoInfo)>>
Lowers syntactic macro call to a token tree representation.
fn macro_arg_text(&self, id: MacroCallId) -> Option<GreenNode>
fn macro_arg_text(&self, id: MacroCallId) -> Option<GreenNode>
Extracts syntax node, corresponding to a macro call. That’s a firewall query, only typing in the macro call itself changes the returned subtree. Read more
fn macro_def(&self, id: MacroDefId) -> Result<Arc<TokenExpander>, ParseError>
fn macro_def(&self, id: MacroDefId) -> Result<Arc<TokenExpander>, ParseError>
Gets the expander for this macro. This compiles declarative macros, and just fetches procedural ones. Read more
fn macro_expand(
&self,
macro_call: MacroCallId
) -> ValueResult<Option<Arc<Subtree>>, ExpandError>
fn macro_expand(
&self,
macro_call: MacroCallId
) -> ValueResult<Option<Arc<Subtree>>, ExpandError>
Expand macro call to a token tree. This query is LRUed (we keep 128 or so results in memory)
fn expand_proc_macro(
&self,
call: MacroCallId
) -> ValueResult<Subtree, ExpandError>
fn expand_proc_macro(
&self,
call: MacroCallId
) -> ValueResult<Subtree, 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! Read more
fn macro_expand_error(&self, macro_call: MacroCallId) -> Option<ExpandError>
fn macro_expand_error(&self, macro_call: MacroCallId) -> Option<ExpandError>
Firewall query that returns the error from the macro_expand
query.
fn hygiene_frame(&self, file_id: HirFileId) -> Arc<HygieneFrame>
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn 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
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
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 + AstDatabase + Upcast<dyn AstDatabase + 'static> + Database + HasQueryGroup<DefDatabaseStorage>,
impl<DB> DefDatabase for DB where
DB: InternDatabase + AstDatabase + Upcast<dyn AstDatabase + 'static> + Database + HasQueryGroup<DefDatabaseStorage>,
fn enable_proc_attr_macros(&self) -> bool
fn set_enable_proc_attr_macros(&mut self, value__: bool)
fn set_enable_proc_attr_macros(&mut self, value__: bool)
Set the value of the enable_proc_attr_macros
input. Read more
fn set_enable_proc_attr_macros_with_durability(
&mut self,
value__: bool,
durability__: Durability
)
fn set_enable_proc_attr_macros_with_durability(
&mut self,
value__: bool,
durability__: Durability
)
Set the value of the enable_proc_attr_macros
input and promise
that its value will never change again. Read more
fn file_item_tree(&self, file_id: HirFileId) -> Arc<ItemTree>
fn crate_def_map(&self, krate: CrateId) -> Arc<DefMap>
fn crate_def_map_query(&self, krate: CrateId) -> Arc<DefMap>
fn block_def_map(&self, block: BlockId) -> Option<Arc<DefMap>>
fn block_def_map(&self, block: BlockId) -> Option<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 union_data(&self, id: UnionId) -> Arc<StructData>
fn enum_data(&self, e: EnumId) -> Arc<EnumData>
fn impl_data(&self, e: ImplId) -> Arc<ImplData>
fn trait_data(&self, e: TraitId) -> Arc<TraitData>
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 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) -> AttrsWithOwner
fn crate_lang_items(&self, krate: CrateId) -> Arc<LangItems>
fn lang_item(
&self,
start_crate: CrateId,
item: SmolStr
) -> Option<LangItemTarget>
fn import_map(&self, krate: CrateId) -> Arc<ImportMap>
fn field_visibilities(
&self,
var: VariantId
) -> Arc<ArenaMap<Idx<FieldData>, Visibility>>
fn function_visibility(&self, def: FunctionId) -> Visibility
fn crate_limits(&self, crate_id: CrateId) -> CrateLimits
impl<DB> HirDatabase for DB where
DB: DefDatabase + Upcast<dyn DefDatabase + 'static> + Database + HasQueryGroup<HirDatabaseStorage>,
impl<DB> HirDatabase for DB where
DB: DefDatabase + Upcast<dyn DefDatabase + 'static> + Database + HasQueryGroup<HirDatabaseStorage>,
fn infer(&self, def: DefWithBodyId) -> Arc<InferenceResult>
fn infer_query(&self, def: DefWithBodyId) -> Arc<InferenceResult>
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 impl_trait(&self, def: ImplId) -> Option<Binders<TraitRef<Interner>>>
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<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(&self, def: GenericDefId) -> Arc<TraitEnvironment>
fn generic_defaults(&self, def: GenericDefId) -> Arc<[Binders<Ty<Interner>>]>
fn inherent_impls_in_crate(&self, krate: CrateId) -> Arc<InherentImpls>
fn inherent_impls_in_block(&self, block: BlockId) -> Option<Arc<InherentImpls>>
fn trait_impls_in_crate(&self, krate: CrateId) -> Arc<TraitImpls>
fn trait_impls_in_block(&self, krate: BlockId) -> Option<Arc<TraitImpls>>
fn trait_impls_in_deps(&self, krate: CrateId) -> 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 associated_ty_data(
&self,
id: AssocTypeId<Interner>
) -> Arc<AssociatedTyDatum<Interner>>
fn trait_datum(
&self,
krate: CrateId,
trait_id: TraitId<Interner>
) -> Arc<TraitDatum<Interner>>
fn struct_datum(
&self,
krate: CrateId,
struct_id: AdtId<Interner>
) -> Arc<AdtDatum<Interner>>
fn impl_datum(
&self,
krate: CrateId,
impl_id: ImplId<Interner>
) -> Arc<ImplDatum<Interner>>
fn fn_def_datum(
&self,
krate: CrateId,
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: CrateId,
id: AssociatedTyValueId<Interner>
) -> Arc<AssociatedTyValue<Interner>>
fn trait_solve(
&self,
krate: CrateId,
goal: Canonical<InEnvironment<Goal<Interner>>>
) -> Option<Solution<Interner>>
fn trait_solve_query(
&self,
krate: CrateId,
goal: Canonical<InEnvironment<Goal<Interner>>>
) -> Option<Solution<Interner>>
fn program_clauses_for_chalk_env(
&self,
krate: CrateId,
env: Environment<Interner>
) -> ProgramClauses<Interner>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<DB> InternDatabase for DB where
DB: SourceDatabase + Database + HasQueryGroup<InternDatabaseStorage>,
impl<DB> InternDatabase for DB where
DB: SourceDatabase + Database + HasQueryGroup<InternDatabaseStorage>,
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_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_block(&self, loc: BlockLoc) -> BlockId
fn lookup_intern_block(&self, key: BlockId) -> BlockLoc
sourceimpl<DB> LineIndexDatabase for DB where
DB: SourceDatabase + Database + HasQueryGroup<LineIndexDatabaseStorage>,
impl<DB> LineIndexDatabase for DB where
DB: SourceDatabase + Database + HasQueryGroup<LineIndexDatabaseStorage>,
fn line_index(&self, file_id: FileId) -> Arc<LineIndex>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<DB> SourceDatabase for DB where
DB: FileLoader + Debug + Database + HasQueryGroup<SourceDatabaseStorage>,
impl<DB> SourceDatabase for DB where
DB: FileLoader + Debug + Database + HasQueryGroup<SourceDatabaseStorage>,
fn parse(&self, file_id: FileId) -> Parse<SourceFile>
sourcefn crate_graph(&self) -> Arc<CrateGraph>
fn crate_graph(&self) -> Arc<CrateGraph>
The crate graph.
sourcefn 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 more
sourcefn 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 and promise
that its value will never change again. Read more
sourceimpl<DB> SourceDatabaseExt for DB where
DB: SourceDatabase + Database + HasQueryGroup<SourceDatabaseExtStorage>,
impl<DB> SourceDatabaseExt for DB where
DB: SourceDatabase + Database + HasQueryGroup<SourceDatabaseExtStorage>,
fn file_text(&self, file_id: FileId) -> Arc<String>
sourcefn set_file_text(&mut self, file_id: FileId, value__: Arc<String>)
fn set_file_text(&mut self, file_id: FileId, value__: Arc<String>)
Set the value of the file_text
input. Read more
sourcefn set_file_text_with_durability(
&mut self,
file_id: FileId,
value__: Arc<String>,
durability__: Durability
)
fn set_file_text_with_durability(
&mut self,
file_id: FileId,
value__: Arc<String>,
durability__: Durability
)
Set the value of the file_text
input and promise
that its value will never change again. Read more
sourcefn 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. Read more
sourcefn 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 more
sourcefn 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 and promise
that its value will never change again. Read more
sourcefn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>
fn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>
Contents of the source root.
sourcefn 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 more
sourcefn 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 and promise
that its value will never change again. Read more
fn source_root_crates(
&self,
id: SourceRootId
) -> Arc<HashSet<CrateId, BuildHasherDefault<FxHasher>>>
sourceimpl<DB> SymbolsDatabase for DB where
DB: HirDatabase + SourceDatabaseExt + Upcast<dyn HirDatabase + 'static> + Database + HasQueryGroup<SymbolsDatabaseStorage>,
impl<DB> SymbolsDatabase for DB where
DB: HirDatabase + SourceDatabaseExt + Upcast<dyn HirDatabase + 'static> + Database + HasQueryGroup<SymbolsDatabaseStorage>,
sourcefn 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. Read more
sourcefn 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.
sourcefn 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. Read more
sourcefn 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 more
sourcefn 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 and promise
that its value will never change again. Read more
sourcefn 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. Read more
sourcefn 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 more
sourcefn 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 and promise
that its value will never change again. Read more
sourceimpl<DB> WithFixture for DB where
DB: 'static + SourceDatabaseExt + Default,
impl<DB> WithFixture for DB where
DB: 'static + SourceDatabaseExt + Default,
fn with_single_file(ra_fixture: &str) -> (Self, FileId)
fn with_many_files(ra_fixture: &str) -> (Self, Vec<FileId, Global>)
fn with_files(ra_fixture: &str) -> Self
fn with_files_extra_proc_macros(
ra_fixture: &str,
proc_macros: Vec<(String, ProcMacro), Global>
) -> Self
fn with_position(ra_fixture: &str) -> (Self, FilePosition)
fn with_range(ra_fixture: &str) -> (Self, FileRange)
fn with_range_or_offset(ra_fixture: &str) -> (Self, FileId, RangeOrOffset)
fn test_crate(&self) -> CrateId
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more