[][src]Trait ra_ap_base_db::SourceDatabase

pub trait SourceDatabase: Database + HasQueryGroup<SourceDatabaseStorage> + CheckCanceled + 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
    ); }

Database which stores all significant input facts: source code and project model. Everything else in rust-analyzer is derived from these queries.

Required methods

fn parse(&self, key0: FileId) -> Parse<SourceFile>

fn crate_graph(&self) -> Arc<CrateGraph>

The crate graph.

fn set_crate_graph(&mut self, value__: Arc<CrateGraph>)

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.

fn set_crate_graph_with_durability(
    &mut self,
    value__: Arc<CrateGraph>,
    durability__: Durability
)

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.

Loading content...

Implementors

impl<DB> SourceDatabase for DB where
    DB: CheckCanceled + FileLoader + Debug,
    DB: Database,
    DB: HasQueryGroup<SourceDatabaseStorage>, 
[src]

Loading content...