pub struct ProjectDefinitions {
pub found: Vec<ProjectDefinition>,
pub conditional: usize,
}Expand description
Every declaration a name refers to — the plural answer to “where is this declared”.
See ProjectIndex::definitions for what the list means, why one namespace is collapsed to one entry, and
what the order is. This type exists because the answer is genuinely plural: an overload set is several
declarations, and a client that can show a list should be given all of them rather than told “ambiguous”.
Fields§
§found: Vec<ProjectDefinition>The declarations to answer with, in the order ProjectIndex::definitions documents. One entry for the
ordinary case, several for an overload set or a name declared in more than one place.
Never empty: a name nothing declares is UnknownReason::NotDeclaredHere rather than an empty list, and a
name whose only declarations are behind a conditional #include is
UnknownReason::ConditionalCompilation. An empty list would be an answer that looks like “here they are”
and says nothing.
conditional: usizeHow many declarations of the same name the index holds that are reachable only through a conditional
#include, and are therefore not in ProjectDefinitions::found: whether they are in scope depends on
macros this layer does not have.
Counted rather than dropped, because “one declaration” and “one declaration and two that might also be there” are different answers, and a consumer that shows the first without the second is claiming more than this layer knows.
Implementations§
Trait Implementations§
Source§impl Clone for ProjectDefinitions
impl Clone for ProjectDefinitions
Source§impl Debug for ProjectDefinitions
impl Debug for ProjectDefinitions
impl Eq for ProjectDefinitions
Source§impl PartialEq for ProjectDefinitions
impl PartialEq for ProjectDefinitions
impl StructuralPartialEq for ProjectDefinitions
Auto Trait Implementations§
impl Forget for ProjectDefinitions
impl Freeze for ProjectDefinitions
impl RefUnwindSafe for ProjectDefinitions
impl Send for ProjectDefinitions
impl Sync for ProjectDefinitions
impl Unpin for ProjectDefinitions
impl UnsafeUnpin for ProjectDefinitions
impl UnwindSafe for ProjectDefinitions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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> ⓘ
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> ⓘ
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