Enum rustc_hir::def::Namespace[−][src]

pub enum Namespace {
    TypeNS,
    ValueNS,
    MacroNS,
}

Different kinds of symbols can coexist even if they share the same textual name. Therefore, they each have a separate universe (known as a “namespace”).

Variants

TypeNS

The type namespace includes structs, enums, unions, traits, and mods (and, by extension, crates).

Note that the type namespace includes other items; this is not an exhaustive list.

ValueNS

The value namespace includes fns, consts, statics, and local variables (including function arguments).

MacroNS

The macro namespace includes macro_rules! macros, declarative macros, procedural macros, attribute macros, derive macros, and non-macro attributes like #[inline] and #[rustfmt::skip].

Implementations

impl Namespace[src]

pub fn descr(self) -> &'static str[src]

The English description of the namespace.

Trait Implementations

impl Clone for Namespace[src]

impl Copy for Namespace[src]

impl Debug for Namespace[src]

impl Eq for Namespace[src]

impl Hash for Namespace[src]

impl<T> Index<Namespace> for PerNS<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<Namespace> for PerNS<T>[src]

impl Ord for Namespace[src]

impl PartialEq<Namespace> for Namespace[src]

impl PartialOrd<Namespace> for Namespace[src]

impl StructuralEq for Namespace[src]

impl StructuralPartialEq for Namespace[src]

Auto Trait Implementations

impl RefUnwindSafe for Namespace

impl Send for Namespace

impl Sync for Namespace

impl Unpin for Namespace

impl UnwindSafe for Namespace

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.