pub enum NameProvenance {
Scope,
ThisFile,
DirectInclude,
IndirectInclude,
}Expand description
Where a name a completion offers was found, relative to the file the cursor is in.
Ordered by nearness, so that the ranking can use the enumeration itself as a tier and two consumers cannot disagree about which of two provenances is closer.
Variants§
Scope
A scope of the file being edited: a local, a parameter, a member of the class the cursor’s body is in, or
the names written directly in a ::-qualified scope.
ThisFile
Written at file scope in the file being edited.
DirectInclude
A header the file being edited includes directly.
IndirectInclude
A file reached only through another file — the standard library’s own headers, mostly.
Trait Implementations§
Source§impl Clone for NameProvenance
impl Clone for NameProvenance
impl Copy for NameProvenance
Source§impl Debug for NameProvenance
impl Debug for NameProvenance
impl Eq for NameProvenance
Source§impl Hash for NameProvenance
impl Hash for NameProvenance
Source§impl Ord for NameProvenance
impl Ord for NameProvenance
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for NameProvenance
impl PartialEq for NameProvenance
Source§impl PartialOrd for NameProvenance
impl PartialOrd for NameProvenance
impl StructuralPartialEq for NameProvenance
Auto Trait Implementations§
impl Forget for NameProvenance
impl Freeze for NameProvenance
impl RefUnwindSafe for NameProvenance
impl Send for NameProvenance
impl Sync for NameProvenance
impl Unpin for NameProvenance
impl UnsafeUnpin for NameProvenance
impl UnwindSafe for NameProvenance
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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