Struct rls_analysis::AnalysisHost
[−]
[src]
pub struct AnalysisHost<L: AnalysisLoader = CargoAnalysisLoader> { /* fields omitted */ }
Methods
impl AnalysisHost<CargoAnalysisLoader>
[src]
fn new(target: Target) -> AnalysisHost
impl<L: AnalysisLoader> AnalysisHost<L>
[src]
fn new_with_loader(l: L) -> AnalysisHost<L>
fn reload_from_analysis(
&self,
analysis: Analysis,
path_prefix: &Path,
base_dir: &Path,
full_docs: bool
) -> AResult<()>
&self,
analysis: Analysis,
path_prefix: &Path,
base_dir: &Path,
full_docs: bool
) -> 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,
full_docs: bool
) -> AResult<()>
&self,
path_prefix: &Path,
base_dir: &Path,
full_docs: bool
) -> AResult<()>
fn hard_reload(
&self,
path_prefix: &Path,
base_dir: &Path,
full_docs: bool
) -> AResult<()>
&self,
path_prefix: &Path,
base_dir: &Path,
full_docs: bool
) -> AResult<()>
fn has_def(&self, id: u32) -> bool
Note that self.has_def == true =/> self.goto_def.is_some(), since if the def is in an api crate, there is no reasonable span to jump to.
fn get_def(&self, id: u32) -> AResult<Def>
fn goto_def(&self, span: &Span<ZeroIndexed>) -> AResult<Span<ZeroIndexed>>
fn for_each_child_def<F, T>(&self, id: u32, f: F) -> AResult<Vec<T>> where
F: Fn(u32, &Def) -> T,
F: Fn(u32, &Def) -> T,
fn def_parents(&self, id: u32) -> AResult<Vec<(u32, String)>>
fn id(&self, span: &Span<ZeroIndexed>) -> AResult<u32>
fn find_all_refs(
&self,
span: &Span<ZeroIndexed>,
include_decl: bool
) -> AResult<Vec<Span<ZeroIndexed>>>
&self,
span: &Span<ZeroIndexed>,
include_decl: bool
) -> AResult<Vec<Span<ZeroIndexed>>>
fn show_type(&self, span: &Span<ZeroIndexed>) -> AResult<String>
fn docs(&self, span: &Span<ZeroIndexed>) -> AResult<String>
fn search(&self, name: &str) -> AResult<Vec<Span<ZeroIndexed>>>
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: u32) -> AResult<Vec<Span<ZeroIndexed>>>
fn find_impls(&self, id: u32) -> AResult<Vec<Span<ZeroIndexed>>>
fn search_for_id(&self, name: &str) -> AResult<Vec<u32>>
Search for a symbol name, returning a list of def_ids for that name.