Trait TypeName

Source
pub trait TypeName {
    // Required method
    fn type_name() -> Type;
}
Expand description

A trait the gives a name an version to a given type

Required Methods§

Source

fn type_name() -> Type

Returns the Type of the &self. Lives only on the instance so you can be object-safe for use in dyn TypeName.

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<T, const N: usize> TypeName for [T; N]
where T: TypeName,

Implementors§