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>,
pub fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>
pub fn parse_or_expand(
&self,
file_id: HirFileId
) -> Option<SyntaxNode<RustLanguage>>
pub 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
pub fn parse_macro_expansion(
&self,
macro_file: MacroFile
) -> ExpandResult<Option<(Parse<SyntaxNode<RustLanguage>>, Arc<TokenMap>)>>
pub fn parse_macro_expansion(
&self,
macro_file: MacroFile
) -> ExpandResult<Option<(Parse<SyntaxNode<RustLanguage>>, Arc<TokenMap>)>>
Implementation for the macro case.
pub fn intern_macro_call(&self, macro_call: MacroCallLoc) -> MacroCallId
pub 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
pub fn lookup_intern_macro_call(&self, key: MacroCallId) -> MacroCallLoc
pub fn macro_arg(&self, id: MacroCallId) -> Option<Arc<(Subtree, TokenMap)>>
pub fn macro_arg(&self, id: MacroCallId) -> Option<Arc<(Subtree, TokenMap)>>
Lowers syntactic macro call to a token tree representation.
pub fn macro_arg_text(&self, id: MacroCallId) -> Option<GreenNode>
pub 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
pub fn macro_def(
&self,
id: MacroDefId
) -> Result<Arc<TokenExpander>, ParseError>
pub 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
pub fn macro_expand(
&self,
macro_call: MacroCallId
) -> ExpandResult<Option<Arc<Subtree>>>
pub fn macro_expand(
&self,
macro_call: MacroCallId
) -> ExpandResult<Option<Arc<Subtree>>>
Expand macro call to a token tree. This query is LRUed (we keep 128 or so results in memory)
pub fn expand_proc_macro(&self, call: MacroCallId) -> ExpandResult<Subtree>
pub fn expand_proc_macro(&self, call: MacroCallId) -> ExpandResult<Subtree>
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
pub fn macro_expand_error(&self, macro_call: MacroCallId) -> Option<ExpandError>
pub fn macro_expand_error(&self, macro_call: MacroCallId) -> Option<ExpandError>
Firewall query that returns the error from the macro_expand
query.
pub 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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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>,
pub fn enable_proc_attr_macros(&self) -> bool
pub fn set_enable_proc_attr_macros(&mut self, value__: bool)
pub fn set_enable_proc_attr_macros(&mut self, value__: bool)
Set the value of the enable_proc_attr_macros
input. Read more
pub fn set_enable_proc_attr_macros_with_durability(
&mut self,
value__: bool,
durability__: Durability
)
pub 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
pub fn file_item_tree(&self, file_id: HirFileId) -> Arc<ItemTree>
pub fn crate_def_map(&self, krate: CrateId) -> Arc<DefMap>
pub fn crate_def_map_query(&self, krate: CrateId) -> Arc<DefMap>
pub fn block_def_map(&self, block: BlockId) -> Option<Arc<DefMap>>
pub 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
pub fn struct_data(&self, id: StructId) -> Arc<StructData>
pub fn union_data(&self, id: UnionId) -> Arc<StructData>
pub fn enum_data(&self, e: EnumId) -> Arc<EnumData>
pub fn impl_data(&self, e: ImplId) -> Arc<ImplData>
pub fn trait_data(&self, e: TraitId) -> Arc<TraitData>
pub fn type_alias_data(&self, e: TypeAliasId) -> Arc<TypeAliasData>
pub fn function_data(&self, func: FunctionId) -> Arc<FunctionData>
pub fn const_data(&self, konst: ConstId) -> Arc<ConstData>
pub fn static_data(&self, konst: StaticId) -> Arc<StaticData>
pub fn body_with_source_map(
&self,
def: DefWithBodyId
) -> (Arc<Body>, Arc<BodySourceMap>)
pub fn body(&self, def: DefWithBodyId) -> Arc<Body>
pub fn expr_scopes(&self, def: DefWithBodyId) -> Arc<ExprScopes>
pub fn generic_params(&self, def: GenericDefId) -> Interned<GenericParams>
pub fn variants_attrs(
&self,
def: EnumId
) -> Arc<ArenaMap<Idx<EnumVariantData>, Attrs>>
pub fn fields_attrs(
&self,
def: VariantId
) -> Arc<ArenaMap<Idx<FieldData>, Attrs>>
pub fn variants_attrs_source_map(
&self,
def: EnumId
) -> Arc<ArenaMap<Idx<EnumVariantData>, AstPtr<Variant>>>
pub fn fields_attrs_source_map(
&self,
def: VariantId
) -> Arc<ArenaMap<Idx<FieldData>, Either<AstPtr<TupleField>, AstPtr<RecordField>>>>
pub fn attrs(&self, def: AttrDefId) -> AttrsWithOwner
pub fn crate_lang_items(&self, krate: CrateId) -> Arc<LangItems>
pub fn lang_item(
&self,
start_crate: CrateId,
item: SmolStr
) -> Option<LangItemTarget>
pub fn import_map(&self, krate: CrateId) -> Arc<ImportMap>
pub fn field_visibilities(
&self,
var: VariantId
) -> Arc<ArenaMap<Idx<FieldData>, Visibility>>
pub fn function_visibility(&self, def: FunctionId) -> Visibility
pub 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>,
pub fn infer(&self, def: DefWithBodyId) -> Arc<InferenceResult>
pub fn infer_query(&self, def: DefWithBodyId) -> Arc<InferenceResult>
pub fn ty(&self, def: TyDefId) -> Binders<Ty<Interner>>
pub fn value_ty(&self, def: ValueTyDefId) -> Binders<Ty<Interner>>
pub fn impl_self_ty(&self, def: ImplId) -> Binders<Ty<Interner>>
pub fn const_param_ty(&self, def: ConstParamId) -> Ty<Interner>
pub fn impl_trait(&self, def: ImplId) -> Option<Binders<TraitRef<Interner>>>
pub fn field_types(
&self,
var: VariantId
) -> Arc<ArenaMap<Idx<FieldData>, Binders<Ty<Interner>>>>
pub fn callable_item_signature(
&self,
def: CallableDefId
) -> Binders<CallableSig>
pub fn return_type_impl_traits(
&self,
def: FunctionId
) -> Option<Arc<Binders<ReturnTypeImplTraits>>>
pub fn generic_predicates_for_param(
&self,
def: GenericDefId,
param_id: TypeParamId,
assoc_name: Option<Name>
) -> Arc<[Binders<Binders<WhereClause<Interner>>>]>
pub fn generic_predicates(
&self,
def: GenericDefId
) -> Arc<[Binders<Binders<WhereClause<Interner>>>]>
pub fn trait_environment(&self, def: GenericDefId) -> Arc<TraitEnvironment>
pub fn generic_defaults(
&self,
def: GenericDefId
) -> Arc<[Binders<Ty<Interner>>]>
pub fn inherent_impls_in_crate(&self, krate: CrateId) -> Arc<InherentImpls>
pub fn inherent_impls_in_block(
&self,
block: BlockId
) -> Option<Arc<InherentImpls>>
pub fn trait_impls_in_crate(&self, krate: CrateId) -> Arc<TraitImpls>
pub fn trait_impls_in_block(&self, krate: BlockId) -> Option<Arc<TraitImpls>>
pub fn trait_impls_in_deps(&self, krate: CrateId) -> Arc<TraitImpls>
pub fn intern_callable_def(
&self,
callable_def: CallableDefId
) -> InternedCallableDefId
pub fn lookup_intern_callable_def(
&self,
key: InternedCallableDefId
) -> CallableDefId
pub fn intern_type_param_id(&self, param_id: TypeParamId) -> InternedTypeParamId
pub fn lookup_intern_type_param_id(
&self,
key: InternedTypeParamId
) -> TypeParamId
pub fn intern_lifetime_param_id(
&self,
param_id: LifetimeParamId
) -> InternedLifetimeParamId
pub fn lookup_intern_lifetime_param_id(
&self,
key: InternedLifetimeParamId
) -> LifetimeParamId
pub fn intern_const_param_id(
&self,
param_id: ConstParamId
) -> InternedConstParamId
pub fn lookup_intern_const_param_id(
&self,
key: InternedConstParamId
) -> ConstParamId
pub fn intern_impl_trait_id(&self, id: ImplTraitId) -> InternedOpaqueTyId
pub fn lookup_intern_impl_trait_id(
&self,
key: InternedOpaqueTyId
) -> ImplTraitId
pub fn intern_closure(
&self,
id: (DefWithBodyId, Idx<Expr>)
) -> InternedClosureId
pub fn lookup_intern_closure(
&self,
key: InternedClosureId
) -> (DefWithBodyId, Idx<Expr>)
pub fn associated_ty_data(
&self,
id: AssocTypeId<Interner>
) -> Arc<AssociatedTyDatum<Interner>>
pub fn trait_datum(
&self,
krate: CrateId,
trait_id: TraitId<Interner>
) -> Arc<TraitDatum<Interner>>
pub fn struct_datum(
&self,
krate: CrateId,
struct_id: AdtId<Interner>
) -> Arc<AdtDatum<Interner>>
pub fn impl_datum(
&self,
krate: CrateId,
impl_id: ImplId<Interner>
) -> Arc<ImplDatum<Interner>>
pub fn fn_def_datum(
&self,
krate: CrateId,
fn_def_id: FnDefId<Interner>
) -> Arc<FnDefDatum<Interner>>
pub fn fn_def_variance(
&self,
fn_def_id: FnDefId<Interner>
) -> Variances<Interner>
pub fn adt_variance(&self, adt_id: AdtId<Interner>) -> Variances<Interner>
pub fn associated_ty_value(
&self,
krate: CrateId,
id: AssociatedTyValueId<Interner>
) -> Arc<AssociatedTyValue<Interner>>
pub fn trait_solve(
&self,
krate: CrateId,
goal: Canonical<InEnvironment<Goal<Interner>>>
) -> Option<Solution<Interner>>
pub fn trait_solve_query(
&self,
krate: CrateId,
goal: Canonical<InEnvironment<Goal<Interner>>>
) -> Option<Solution<Interner>>
pub 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>,
pub fn intern_function(&self, loc: AssocItemLoc<Function>) -> FunctionId
pub fn lookup_intern_function(&self, key: FunctionId) -> AssocItemLoc<Function>
pub fn intern_struct(&self, loc: ItemLoc<Struct>) -> StructId
pub fn lookup_intern_struct(&self, key: StructId) -> ItemLoc<Struct>
pub fn intern_union(&self, loc: ItemLoc<Union>) -> UnionId
pub fn lookup_intern_union(&self, key: UnionId) -> ItemLoc<Union>
pub fn intern_enum(&self, loc: ItemLoc<Enum>) -> EnumId
pub fn lookup_intern_enum(&self, key: EnumId) -> ItemLoc<Enum>
pub fn intern_const(&self, loc: AssocItemLoc<Const>) -> ConstId
pub fn lookup_intern_const(&self, key: ConstId) -> AssocItemLoc<Const>
pub fn intern_static(&self, loc: AssocItemLoc<Static>) -> StaticId
pub fn lookup_intern_static(&self, key: StaticId) -> AssocItemLoc<Static>
pub fn intern_trait(&self, loc: ItemLoc<Trait>) -> TraitId
pub fn lookup_intern_trait(&self, key: TraitId) -> ItemLoc<Trait>
pub fn intern_type_alias(&self, loc: AssocItemLoc<TypeAlias>) -> TypeAliasId
pub fn lookup_intern_type_alias(
&self,
key: TypeAliasId
) -> AssocItemLoc<TypeAlias>
pub fn intern_impl(&self, loc: ItemLoc<Impl>) -> ImplId
pub fn lookup_intern_impl(&self, key: ImplId) -> ItemLoc<Impl>
pub fn intern_extern_block(&self, loc: ItemLoc<ExternBlock>) -> ExternBlockId
pub fn lookup_intern_extern_block(
&self,
key: ExternBlockId
) -> ItemLoc<ExternBlock>
pub fn intern_block(&self, loc: BlockLoc) -> BlockId
pub 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>,
pub fn parse(&self, file_id: FileId) -> Parse<SourceFile>
sourcepub fn crate_graph(&self) -> Arc<CrateGraph>
pub fn crate_graph(&self) -> Arc<CrateGraph>
The crate graph.
sourcepub fn set_crate_graph(&mut self, value__: Arc<CrateGraph>)
pub fn set_crate_graph(&mut self, value__: Arc<CrateGraph>)
Set the value of the crate_graph
input. Read more
sourcepub fn set_crate_graph_with_durability(
&mut self,
value__: Arc<CrateGraph>,
durability__: Durability
)
pub 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>,
pub fn file_text(&self, file_id: FileId) -> Arc<String>
sourcepub fn set_file_text(&mut self, file_id: FileId, value__: Arc<String>)
pub fn set_file_text(&mut self, file_id: FileId, value__: Arc<String>)
Set the value of the file_text
input. Read more
sourcepub fn set_file_text_with_durability(
&mut self,
file_id: FileId,
value__: Arc<String>,
durability__: Durability
)
pub 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
sourcepub fn file_source_root(&self, file_id: FileId) -> SourceRootId
pub 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
sourcepub fn set_file_source_root(&mut self, file_id: FileId, value__: SourceRootId)
pub fn set_file_source_root(&mut self, file_id: FileId, value__: SourceRootId)
Set the value of the file_source_root
input. Read more
sourcepub fn set_file_source_root_with_durability(
&mut self,
file_id: FileId,
value__: SourceRootId,
durability__: Durability
)
pub 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
sourcepub fn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>
pub fn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>
Contents of the source root.
sourcepub fn set_source_root(&mut self, id: SourceRootId, value__: Arc<SourceRoot>)
pub fn set_source_root(&mut self, id: SourceRootId, value__: Arc<SourceRoot>)
Set the value of the source_root
input. Read more
sourcepub fn set_source_root_with_durability(
&mut self,
id: SourceRootId,
value__: Arc<SourceRoot>,
durability__: Durability
)
pub 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
pub 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<FxHashSet<SourceRootId>>
fn local_roots(&self) -> Arc<FxHashSet<SourceRootId>>
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<FxHashSet<SourceRootId>>)
fn set_local_roots(&mut self, value__: Arc<FxHashSet<SourceRootId>>)
Set the value of the local_roots
input. Read more
sourcefn set_local_roots_with_durability(
&mut self,
value__: Arc<FxHashSet<SourceRootId>>,
durability__: Durability
)
fn set_local_roots_with_durability(
&mut self,
value__: Arc<FxHashSet<SourceRootId>>,
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<FxHashSet<SourceRootId>>
fn library_roots(&self) -> Arc<FxHashSet<SourceRootId>>
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<FxHashSet<SourceRootId>>)
fn set_library_roots(&mut self, value__: Arc<FxHashSet<SourceRootId>>)
Set the value of the library_roots
input. Read more
sourcefn set_library_roots_with_durability(
&mut self,
value__: Arc<FxHashSet<SourceRootId>>,
durability__: Durability
)
fn set_library_roots_with_durability(
&mut self,
value__: Arc<FxHashSet<SourceRootId>>,
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_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