Skip to main content

NameNamespace

Trait NameNamespace 

Source
pub trait NameNamespace:
    Debug
    + Clone
    + Copy
    + PartialEq
    + Eq
    + Hash
    + PartialOrd
    + Ord
    + 'static {
    const DISPLAY_NAME: &'static str;
}
Expand description

Marker trait for a semantic name namespace.

Namespaces are zero-sized marker types used by NameDef and ResolvedName to make it impossible to mix, for example, a function name with an index name. The marker’s NameNamespace::DISPLAY_NAME is used only for diagnostics and panic messages at construction boundaries.

Required Associated Constants§

Source

const DISPLAY_NAME: &'static str

Human-readable alias/newtype name for this namespace.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl NameNamespace for Constructor

Source§

const DISPLAY_NAME: &'static str = "ConstructorName"

Source§

impl NameNamespace for Decl

Source§

const DISPLAY_NAME: &'static str = "DeclName"

Source§

impl NameNamespace for Dim

Source§

const DISPLAY_NAME: &'static str = "DimName"

Source§

impl NameNamespace for DimVar

Source§

const DISPLAY_NAME: &'static str = "DimVarName"

Source§

impl NameNamespace for Field

Source§

const DISPLAY_NAME: &'static str = "FieldName"

Source§

impl NameNamespace for Fn

Source§

const DISPLAY_NAME: &'static str = "FnName"

Source§

impl NameNamespace for GenericParam

Source§

const DISPLAY_NAME: &'static str = "GenericParamName"

Source§

impl NameNamespace for Index

Source§

const DISPLAY_NAME: &'static str = "IndexName"

Source§

impl NameNamespace for IndexVariant

Source§

const DISPLAY_NAME: &'static str = "IndexVariantName"

Source§

impl NameNamespace for Local

Source§

const DISPLAY_NAME: &'static str = "LocalName"

Source§

impl NameNamespace for ModuleAlias

Source§

const DISPLAY_NAME: &'static str = "ModuleAliasName"

Source§

impl NameNamespace for PlotProperty

Source§

const DISPLAY_NAME: &'static str = "PlotPropertyName"

Source§

impl NameNamespace for StructType

Source§

const DISPLAY_NAME: &'static str = "StructTypeName"

Source§

impl NameNamespace for Unit

Source§

const DISPLAY_NAME: &'static str = "UnitName"