Struct rls_analysis::AnalysisHost
[−]
[src]
pub struct AnalysisHost<L: AnalysisLoader = CargoAnalysisLoader> { /* fields omitted */ }
Methods
impl AnalysisHost<CargoAnalysisLoader>[src]
fn new(target: Target) -> AnalysisHost[src]
impl<L: AnalysisLoader> AnalysisHost<L>[src]
fn new_with_loader(loader: L) -> Self[src]
fn reload_from_analysis(
&self,
analysis: Vec<Analysis>,
path_prefix: &Path,
base_dir: &Path,
blacklist: &'a [&'static str]
) -> AResult<()>[src]
&self,
analysis: Vec<Analysis>,
path_prefix: &Path,
base_dir: &Path,
blacklist: &'a [&'static str]
) -> AResult<()>
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.
fn reload(&self, path_prefix: &Path, base_dir: &Path) -> AResult<()>[src]
fn reload_with_blacklist(
&self,
path_prefix: &Path,
base_dir: &Path,
blacklist: &'a [&'static str]
) -> AResult<()>[src]
&self,
path_prefix: &Path,
base_dir: &Path,
blacklist: &'a [&'static str]
) -> AResult<()>
fn hard_reload(&self, path_prefix: &Path, base_dir: &Path) -> AResult<()>[src]
Reloads the entire project's analysis data.
fn hard_reload_with_blacklist(
&self,
path_prefix: &Path,
base_dir: &Path,
blacklist: &'a [&'static str]
) -> AResult<()>[src]
&self,
path_prefix: &Path,
base_dir: &Path,
blacklist: &'a [&'static str]
) -> AResult<()>
fn has_def(&self, id: Id) -> bool[src]
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.
fn get_def(&self, id: Id) -> AResult<Def>[src]
fn goto_def(&self, span: &Span) -> AResult<Span>[src]
fn for_each_child_def<F, T>(&self, id: Id, f: F) -> AResult<Vec<T>> where
F: FnMut(Id, &Def) -> T, [src]
F: FnMut(Id, &Def) -> T,
fn def_parents(&self, id: Id) -> AResult<Vec<(Id, String)>>[src]
fn def_roots(&self) -> AResult<Vec<(Id, String)>>[src]
Returns the name of each crate in the program and the id of the root module of that crate.
fn id(&self, span: &Span) -> AResult<Id>[src]
fn crate_local_id(&self, span: &Span) -> AResult<Id>[src]
Like id, but will only return a value if it is in the same crate as span.
fn find_all_refs(
&self,
span: &Span,
include_decl: bool,
force_unique_spans: bool
) -> AResult<Vec<Span>>[src]
&self,
span: &Span,
include_decl: bool,
force_unique_spans: bool
) -> AResult<Vec<Span>>
fn show_type(&self, span: &Span) -> AResult<String>[src]
fn docs(&self, span: &Span) -> AResult<String>[src]
fn matching_defs(&self, stem: &str) -> AResult<Vec<Def>>[src]
Finds Defs with names that starting with (ignoring case) stem
fn search(&self, name: &str) -> AResult<Vec<Span>>[src]
Search for a symbol name, returns a list of spans matching defs and refs for that name.
fn find_all_refs_by_id(&self, id: Id) -> AResult<Vec<Span>>[src]
fn find_impls(&self, id: Id) -> AResult<Vec<Span>>[src]
fn search_for_id(&self, name: &str) -> AResult<Vec<Id>>[src]
Search for a symbol name, returning a list of def_ids for that name.