Expand description
This crate defines the core data structure representing IDE state – RootDatabase
.
It is mainly a HirDatabase
for semantic analysis, plus a SymbolsDatabase
, for fuzzy search.
Re-exports§
pub use ::line_index;
pub use base_db;
Modules§
- This module provides functionality for querying callable information about a token.
- This module defines the
Assist
data structure. The actual assist live in theide_assists
downstream crate. We want to define the data structures in this low-level crate though, becauseide_diagnostics
also need them (fixits for diagnostics and assists are the same thing under the hood). We want to compileide_assists
andide_diagnostics
in parallel though, so we pull the common definitions upstream, to this crate. NameDefinition
keeps information about the element we want to search references for. The element is represented byNameKind
. It’s located inside somecontainer
and has avisibility
, which defines a search scope. Note that the reference search is possible for not all of the classified items.- Documentation attribute related utilities.
- See
FamousDefs
. - Random assortment of ide helpers for high-level ide features that don’t fit in any other module.
- This module has the functionality to search the project and its dependencies for a certain item, by its name and a few criteria. The main reason for this module to exist is the fact that project’s items and dependencies’ items are located in different caches, with different APIs.
- See
Label
- See
PathTransform
. - rust-analyzer is lazy and doesn’t compute anything unless asked. This sometimes is counter productive when, for example, the first goto definition request takes longer to compute. This module implements prepopulation of various caches, it’s not really advanced at the moment.
- Rename infrastructure for rust-analyzer. It is used primarily for the literal “rename” in the ide (look for tests there), but it is also available as a general-purpose service. For example, it is used by the fix for the “incorrect case” diagnostic.
- Rustdoc specific doc comment handling
- Implementation of find-usages functionality.
- This modules defines type to represent changes to the source code, that flow from the server to the client.
- This module handles fuzzy-searching of functions, structs and other symbols by name across the whole workspace and dependencies.
- Functionality for obtaining data related to traits from the DB.
- This module contains structures for filtering the expected types. Use case for structures in this module is, for example, situation when you need to process only certain
Enum
s. - Functionality for generating trivial constructors
Macros§
Structs§
- Handle to a file in
Vfs
- A speedy hash algorithm for use within rustc. The hashmap in liballoc by default uses SipHash which isn’t quite as speedy as we want. In the compiler we’re not really worried about DOS attempts, so we use a fast non-cryptographic hash.
- Representative struct for the query group.
Enums§
Traits§
Type Aliases§
- Type alias for a hash map that uses the Fx hashing algorithm.
- Type alias for a hash set that uses the Fx hashing algorithm.