pub struct ReferencesQuery {
pub name: String,
pub symbol: Option<SymbolKind>,
pub language: Option<LanguageId>,
pub declared_in: Option<RelPath>,
}Expand description
The declaration(s) called name, and every identifier that spells it,
each judged against the declaration meant. What rename gathers before
it plans, and what references answers on its own.
Fields§
§name: String§symbol: Option<SymbolKind>§language: Option<LanguageId>§declared_in: Option<RelPath>The file declaring the symbol meant, when several share the name.
Implementations§
Source§impl ReferencesQuery
impl ReferencesQuery
pub fn new(name: impl Into<String>) -> Self
pub fn declared_in(self, path: impl Into<RelPath>) -> Self
pub fn of_symbol(self, symbol: SymbolKind) -> Self
pub fn in_language(self, language: impl Into<LanguageId>) -> Self
Sourcepub fn execute(self, engine: &Engine) -> Result<References, EngineError>
pub fn execute(self, engine: &Engine) -> Result<References, EngineError>
Answer with declarations and judged occurrences, without a mutation plan.
Sourcepub fn definitions(self, engine: &Engine) -> Result<Definitions, EngineError>
pub fn definitions(self, engine: &Engine) -> Result<Definitions, EngineError>
Reference evidence for every possible definition, gathered from one tree snapshot. Unlike a rename, a definition lookup starts at a use site: each candidate must be judged before that site’s imports can choose its target.
Trait Implementations§
Source§impl Clone for ReferencesQuery
impl Clone for ReferencesQuery
Source§impl Debug for ReferencesQuery
impl Debug for ReferencesQuery
Source§impl<'de> Deserialize<'de> for ReferencesQuery
impl<'de> Deserialize<'de> for ReferencesQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ReferencesQuery
Source§impl PartialEq for ReferencesQuery
impl PartialEq for ReferencesQuery
Source§impl Serialize for ReferencesQuery
impl Serialize for ReferencesQuery
impl StructuralPartialEq for ReferencesQuery
Auto Trait Implementations§
impl Freeze for ReferencesQuery
impl RefUnwindSafe for ReferencesQuery
impl Send for ReferencesQuery
impl Sync for ReferencesQuery
impl Unpin for ReferencesQuery
impl UnsafeUnpin for ReferencesQuery
impl UnwindSafe for ReferencesQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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