pub(crate) struct NameResolution<'db> {
pub generics: Vec<SymGenericTerm<'db>>,
pub sym: NameResolutionSym<'db>,
}Fields§
§generics: Vec<SymGenericTerm<'db>>§sym: NameResolutionSym<'db>Implementations§
Source§impl<'db> NameResolution<'db>
impl<'db> NameResolution<'db>
Sourcepub fn categorize(&self, db: &'db dyn Db) -> impl Display + 'db
pub fn categorize(&self, db: &'db dyn Db) -> impl Display + 'db
Returns a string describing self that fits the mold “an X”.
Sourcepub fn describe(&self, db: &'db dyn Db) -> impl Display + 'db
pub fn describe(&self, db: &'db dyn Db) -> impl Display + 'db
Returns a string describing self that fits the mold “an X named foo”.
Sourcepub(crate) fn resolve_relative_id(
self,
db: &'db dyn Db,
id: SpannedIdentifier<'db>,
) -> Errors<Result<NameResolution<'db>, NameResolution<'db>>>
pub(crate) fn resolve_relative_id( self, db: &'db dyn Db, id: SpannedIdentifier<'db>, ) -> Errors<Result<NameResolution<'db>, NameResolution<'db>>>
Like NameResolutionSym::resolve_relative_id but also threads the
generic arguments through.
Sourcepub(crate) async fn resolve_relative_generic_args(
self,
env: &mut Env<'db>,
generics: &SpanVec<'db, AstGenericTerm<'db>>,
) -> Errors<NameResolution<'db>>
pub(crate) async fn resolve_relative_generic_args( self, env: &mut Env<'db>, generics: &SpanVec<'db, AstGenericTerm<'db>>, ) -> Errors<NameResolution<'db>>
Attempts to resolve generic argments like foo[u32].
Trait Implementations§
Source§impl<'db> Clone for NameResolution<'db>
impl<'db> Clone for NameResolution<'db>
Source§fn clone(&self) -> NameResolution<'db>
fn clone(&self) -> NameResolution<'db>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'db> Debug for NameResolution<'db>
impl<'db> Debug for NameResolution<'db>
Source§impl<'db> From<NameResolution<'db>> for ExprResultKind<'db>
impl<'db> From<NameResolution<'db>> for ExprResultKind<'db>
Source§fn from(value: NameResolution<'db>) -> Self
fn from(value: NameResolution<'db>) -> Self
Converts to this type from the input type.
Source§impl<'db> PartialEq for NameResolution<'db>
impl<'db> PartialEq for NameResolution<'db>
Source§impl<'db> Serialize for NameResolution<'db>
impl<'db> Serialize for NameResolution<'db>
Source§impl<'db> Update for NameResolution<'db>
impl<'db> Update for NameResolution<'db>
impl<'db> Eq for NameResolution<'db>
impl<'db> StructuralPartialEq for NameResolution<'db>
Auto Trait Implementations§
impl<'db> Freeze for NameResolution<'db>
impl<'db> !RefUnwindSafe for NameResolution<'db>
impl<'db> Send for NameResolution<'db>
impl<'db> Sync for NameResolution<'db>
impl<'db> Unpin for NameResolution<'db>
impl<'db> UnsafeUnpin for NameResolution<'db>
impl<'db> !UnwindSafe for NameResolution<'db>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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