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: IdentThe identifier for the binding, aways the normalize_to_macros_2_0 version of the
identifier.
ns: Namespacedisambiguator: u320 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 more
sourceimpl 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
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &BindingKey) -> bool
fn ne(&self, other: &BindingKey) -> bool
This method tests for !=.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. 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