pub trait LoadedFileIndexes {
// Required methods
fn contains_file(&self, rel_path: &str) -> bool;
fn file_index(&self, rel_path: &str) -> Option<LoadedIndex>;
fn rust_files(&self) -> Vec<String>;
fn module_declaring_files(&self) -> Vec<String>;
// Provided method
fn module_parents(&self) -> Option<Arc<ModuleParents>> { ... }
}Expand description
File indexes a ProjectIndex loads when resolution first reaches
them, rather than binding every file eagerly.
Required Methods§
Sourcefn contains_file(&self, rel_path: &str) -> bool
fn contains_file(&self, rel_path: &str) -> bool
Whether rel_path is an indexed file.
Sourcefn file_index(&self, rel_path: &str) -> Option<LoadedIndex>
fn file_index(&self, rel_path: &str) -> Option<LoadedIndex>
rel_path’s index, or None when it is not an indexed file.
Sourcefn rust_files(&self) -> Vec<String>
fn rust_files(&self) -> Vec<String>
Every indexed Rust file, in no order.
Sourcefn module_declaring_files(&self) -> Vec<String>
fn module_declaring_files(&self) -> Vec<String>
Every indexed file that declares a module, in no order.
Provided Methods§
Sourcefn module_parents(&self) -> Option<Arc<ModuleParents>>
fn module_parents(&self) -> Option<Arc<ModuleParents>>
For each declared module target, its parent: the smallest
(declaring file, module name) pair over every module-declaring
file, as note_module_parents keeps it. None when the loader
does not keep them, and the index binds every module-declaring file
to find them.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".