Struct rustc_resolve::BindingKey
source · pub(crate) struct BindingKey {
pub(crate) ident: Ident,
pub(crate) ns: Namespace,
pub(crate) disambiguator: u32,
}
Expand description
A key that identifies a binding in a given Module
.
Multiple bindings in the same module can have the same key (in a valid program) if all but one of them come from glob imports.
Fields
ident: Ident
The identifier for the binding, always the normalize_to_macros_2_0
version of the
identifier.
ns: Namespace
disambiguator: u32
0 if ident is not _
, otherwise a value that’s unique to the specific
_
in the expanded AST that introduced this binding.
Trait Implementations
sourceimpl Clone for BindingKey
impl Clone for BindingKey
sourcefn clone(&self) -> BindingKey
fn clone(&self) -> BindingKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for BindingKey
impl Debug for BindingKey
sourceimpl Hash for BindingKey
impl Hash for BindingKey
sourceimpl PartialEq<BindingKey> for BindingKey
impl PartialEq<BindingKey> for BindingKey
sourcefn eq(&self, other: &BindingKey) -> bool
fn eq(&self, other: &BindingKey) -> bool
impl Copy for BindingKey
impl Eq for BindingKey
impl StructuralEq for BindingKey
impl StructuralPartialEq for BindingKey
Auto Trait Implementations
impl RefUnwindSafe for BindingKey
impl !Send for BindingKey
impl !Sync for BindingKey
impl Unpin for BindingKey
impl UnwindSafe for BindingKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 20 bytes