Skip to main content

Typename

Trait Typename 

Source
pub trait Typename {
    // Required method
    fn typename(&self) -> &'static str;
}
Expand description

Trait for types that can provide their type name as a static string

Required Methods§

Source

fn typename(&self) -> &'static str

Get the type name for this instance For enums, this can return different names based on the variant

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§