Trait RootQueryDb

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

Required Methods§

Source

fn parse(&self, file_id: EditionedFileId) -> Parse<SourceFile>

Source

fn parse_errors(&self, file_id: EditionedFileId) -> Option<&[SyntaxError]>

Source

fn toolchain_channel(&self, krate: Crate) -> Option<ReleaseChannel>

Source

fn source_root_crates(&self, id: SourceRootId) -> Arc<[Crate]>

Source

fn relevant_crates(&self, file_id: FileId) -> Arc<[Crate]>

Source

fn all_crates(&self) -> Arc<Box<[Crate]>>

Source

fn transitive_deps(&self, crate_id: Crate) -> FxHashSet<Crate>

Source

fn transitive_rev_deps(&self, of: Crate) -> FxHashSet<Crate>

Source

fn set_all_crates(&mut self, __value: Arc<Box<[Crate]>>)

Source

fn set_all_crates_with_durability( &mut self, __value: Arc<Box<[Crate]>>, durability: Durability, )

Implementors§

Source§

impl<DB> RootQueryDb for DB
where DB: SourceDatabase + Database,