pub struct Dependency<'a> {
pub ident: &'a str,
pub usage: Span,
}
Expand description
A reference to a module-scope definition or predeclared object.
Each GlobalDecl
holds a set of these values, to be resolved to
specific definitions later. To support de-duplication, Eq
and
Hash
on a Dependency
value consider only the name, not the
source location at which the reference occurs.
Fields§
§ident: &'a str
The name referred to.
usage: Span
The location at which the reference to that name occurs.
Trait Implementations§
source§impl<'a> Debug for Dependency<'a>
impl<'a> Debug for Dependency<'a>
source§impl Hash for Dependency<'_>
impl Hash for Dependency<'_>
source§impl PartialEq for Dependency<'_>
impl PartialEq for Dependency<'_>
impl Eq for Dependency<'_>
Auto Trait Implementations§
impl<'a> Freeze for Dependency<'a>
impl<'a> RefUnwindSafe for Dependency<'a>
impl<'a> Send for Dependency<'a>
impl<'a> Sync for Dependency<'a>
impl<'a> Unpin for Dependency<'a>
impl<'a> UnwindSafe for Dependency<'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
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.