Trait ra_ap_base_db::SourceDatabase[][src]

pub trait SourceDatabase: Database + HasQueryGroup<SourceDatabaseStorage> + FileLoader + Debug {
    fn parse(&self, key0: FileId) -> Parse<SourceFile>;
fn crate_graph(&self) -> Arc<CrateGraph>;
fn set_crate_graph(&mut self, value__: Arc<CrateGraph>);
fn set_crate_graph_with_durability(
        &mut self,
        value__: Arc<CrateGraph>,
        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

The crate graph.

Set the value of the crate_graph input.

See crate_graph for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

Set the value of the crate_graph input and promise that its value will never change again.

See crate_graph for details.

Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.

Implementors