Struct rls_analysis::AnalysisHost
source · [−]pub struct AnalysisHost<L: AnalysisLoader = CargoAnalysisLoader> { /* private fields */ }
Implementations
Reloads given data passed in analysis
. This will first check and read
on-disk data (just like reload
). It then imports the data we’re
passing in directly.
pub fn reload_with_blacklist(
&self,
path_prefix: &Path,
base_dir: &Path,
blacklist: &[impl AsRef<str> + Debug]
) -> AResult<()>
Reloads the entire project’s analysis data.
pub fn hard_reload_with_blacklist(
&self,
path_prefix: &Path,
base_dir: &Path,
blacklist: &[impl AsRef<str> + Debug]
) -> AResult<()>
Note that self.has_def()
=/> self.goto_def().is_ok()
, since if the
Def is in an api crate, there is no reasonable Span to jump to.
pub fn for_each_child_def<F, T>(&self, id: Id, f: F) -> AResult<Vec<T>> where
F: FnMut(Id, &Def) -> T,
Returns the name of each crate in the program and the id of the root module of that crate.
Like id, but will only return a value if it is in the same crate as span.
pub fn find_all_refs(
&self,
span: &Span,
include_decl: bool,
force_unique_spans: bool
) -> AResult<Vec<Span>>
Finds Defs with names that starting with (ignoring case) stem
Search for a symbol name, returns a list of spans matching defs and refs for that name.
Search for a symbol name, returning a list of def_ids for that name.