Crate ra_ap_ide_db

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

Modules§

  • This module provides functionality for querying callable information about a token.
  • This module defines the Assist data structure. The actual assist live in the ide_assists downstream crate. We want to define the data structures in this low-level crate though, because ide_diagnostics also need them (fixits for diagnostics and assists are the same thing under the hood). We want to compile ide_assists and ide_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 by NameKind. It’s located inside some container and has a visibility, which defines a search scope. Note that the reference search is possible for not all of the classified items.
  • Documentation attribute related utilities.
  • 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
  • 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 Enums.
  • Functionality for generating trivial constructors

Macros§

Structs§

Enums§

Traits§

Type Aliases§