pub struct Driver { /* private fields */ }Expand description
Pipeline orchestration wrapper around ProjectDb.
Implementations§
Source§impl Driver
impl Driver
Sourcepub fn db_mut(&mut self) -> &mut ProjectDb
pub fn db_mut(&mut self) -> &mut ProjectDb
Mutably borrow the underlying database.
Invalidates the cached analysis result, since any mutation may change HIR/manifest data that analysis depends on.
Sourcepub fn discover<F>(
&mut self,
entry: &str,
read_file: F,
) -> Result<(), DiscoverError>
pub fn discover<F>( &mut self, entry: &str, read_file: F, ) -> Result<(), DiscoverError>
Discover all files reachable via INCLUDEs from the entry point.
Sourcepub fn analyze(&mut self) -> &AnalysisResult
pub fn analyze(&mut self) -> &AnalysisResult
Run cross-file analysis on all files (or return cached result).
Sourcepub fn analyze_project(&self, file_ids: &[FileId]) -> AnalysisResult
pub fn analyze_project(&self, file_ids: &[FileId]) -> AnalysisResult
Run analysis on a specific subset of files (one project). Not cached.
Sourcepub fn analysis_inputs_for(
&self,
file_ids: &[FileId],
) -> Vec<(FileId, HirFile, SymbolManifest)>
pub fn analysis_inputs_for( &self, file_ids: &[FileId], ) -> Vec<(FileId, HirFile, SymbolManifest)>
Snapshot analysis inputs for a subset of files.
Sourcepub fn analysis_inputs(&self) -> Vec<(FileId, HirFile, SymbolManifest)>
pub fn analysis_inputs(&self) -> Vec<(FileId, HirFile, SymbolManifest)>
Snapshot all analysis inputs.
Sourcepub fn compute_projects(&self) -> Vec<(FileId, Vec<FileId>)>
pub fn compute_projects(&self) -> Vec<(FileId, Vec<FileId>)>
Compute independent projects from include relationships.
Sourcepub fn file_ids_topo(&self, entry: FileId) -> Vec<FileId>
pub fn file_ids_topo(&self, entry: FileId) -> Vec<FileId>
Return file IDs in topological include order.
Sourcepub fn file_metadata(&self) -> Vec<(FileId, String, String)>
pub fn file_metadata(&self) -> Vec<(FileId, String, String)>
Snapshot file metadata for diagnostic publishing.
Sourcepub fn collect_diagnostics(
&self,
analysis: &AnalysisResult,
entry: Option<FileId>,
) -> DiagnosticReport
pub fn collect_diagnostics( &self, analysis: &AnalysisResult, entry: Option<FileId>, ) -> DiagnosticReport
Collect all diagnostics (lowering + analysis), apply suppressions, partition.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Driver
impl RefUnwindSafe for Driver
impl Send for Driver
impl Sync for Driver
impl Unpin for Driver
impl UnsafeUnpin for Driver
impl UnwindSafe for Driver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more