Trait ide_db::symbol_index::SymbolsDatabase
source · pub trait SymbolsDatabase:
Database
+ HasQueryGroup<SymbolsDatabaseStorage>
+ HirDatabase
+ SourceRootDatabase
+ Upcast<dyn HirDatabase> {
// Required methods
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<FxHashSet<SourceRootId>>;
fn set_local_roots(&mut self, value__: Arc<FxHashSet<SourceRootId>>);
fn set_local_roots_with_durability(
&mut self,
value__: Arc<FxHashSet<SourceRootId>>,
durability__: Durability,
);
fn library_roots(&self) -> Arc<FxHashSet<SourceRootId>>;
fn set_library_roots(&mut self, value__: Arc<FxHashSet<SourceRootId>>);
fn set_library_roots_with_durability(
&mut self,
value__: Arc<FxHashSet<SourceRootId>>,
durability__: Durability,
);
}
Required Methods§
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.
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 crate_symbols(&self, krate: Crate) -> Box<[Arc<SymbolIndex>]>
fn crate_symbols(&self, krate: Crate) -> Box<[Arc<SymbolIndex>]>
The symbol indices of modules that make up a given crate.
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.
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.
See local_roots
for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
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 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.
See local_roots
for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
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.
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.
See library_roots
for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
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 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.
See library_roots
for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.