pub struct CallResolver<'a> {
client: &'a mut RAClient,
state: FxHashMap<Identifier, Vec<IdentifierReference>>,
path: Option<PathBuf>,
}Expand description
A wrapper around a rust-analyzer client that can resolve call references. This is quite expensive so we cache the results in an on-disk key-value store.
Fields§
§client: &'a mut RAClient§state: FxHashMap<Identifier, Vec<IdentifierReference>>§path: Option<PathBuf>Implementations§
Source§impl<'a> CallResolver<'a>
impl<'a> CallResolver<'a>
pub fn new(client: &'a mut RAClient, path: Option<PathBuf>) -> Self
pub fn cached_count(&self) -> usize
pub fn cleared(self) -> Self
pub fn resolve(&mut self, ident: &Identifier) -> Vec<IdentifierReference>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CallResolver<'a>
impl<'a> RefUnwindSafe for CallResolver<'a>
impl<'a> Send for CallResolver<'a>
impl<'a> !Sync for CallResolver<'a>
impl<'a> Unpin for CallResolver<'a>
impl<'a> !UnwindSafe for CallResolver<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more