pub trait RootQueryDb: SourceDatabase + Database {
// Required methods
fn parse(&self, file_id: EditionedFileId) -> Parse<SourceFile>;
fn parse_errors(&self, file_id: EditionedFileId) -> Option<&[SyntaxError]>;
fn toolchain_channel(&self, krate: Crate) -> Option<ReleaseChannel>;
fn source_root_crates(&self, id: SourceRootId) -> Arc<[Crate]>;
fn relevant_crates(&self, file_id: FileId) -> Arc<[Crate]>;
fn all_crates(&self) -> Arc<Box<[Crate]>>;
fn transitive_deps(&self, crate_id: Crate) -> FxHashSet<Crate>;
fn transitive_rev_deps(&self, of: Crate) -> FxHashSet<Crate>;
fn set_all_crates(&mut self, __value: Arc<Box<[Crate]>>);
fn set_all_crates_with_durability(
&mut self,
__value: Arc<Box<[Crate]>>,
durability: Durability,
);
}
Expand description
Database which stores all significant input facts: source code and project model. Everything else in rust-analyzer is derived from these queries.