Trait Named

Source
pub trait Named {
    const NAME: &'static str;
}
Expand description

Defines the name of a type. This is useful for constructing error messages in a generic function.

Required Associated Constants§

Source

const NAME: &'static str

The name of Self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Named for bool

Source§

const NAME: &'static str = "bool"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for char

Source§

const NAME: &'static str = "char"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for f32

Source§

const NAME: &'static str = "f32"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for f64

Source§

const NAME: &'static str = "f64"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for i8

Source§

const NAME: &'static str = "i8"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for i16

Source§

const NAME: &'static str = "i16"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for i32

Source§

const NAME: &'static str = "i32"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for i64

Source§

const NAME: &'static str = "i64"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for i128

Source§

const NAME: &'static str = "i128"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for isize

Source§

const NAME: &'static str = "isize"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for u8

Source§

const NAME: &'static str = "u8"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for u16

Source§

const NAME: &'static str = "u16"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for u32

Source§

const NAME: &'static str = "u32"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for u64

Source§

const NAME: &'static str = "u64"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for u128

Source§

const NAME: &'static str = "u128"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for usize

Source§

const NAME: &'static str = "usize"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Source§

impl Named for String

Source§

const NAME: &'static str = "String"

The name of this type, as given by the stringify macro.

See the documentation for impl_named for more details.

Implementors§

Source§

impl Named for RoundingMode

Source§

const NAME: &'static str = "RoundingMode"