TypeNamed

Trait TypeNamed 

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

Allows getting the name of the type contained in a Box<dyn Any>

Care should be taken when using this, and the output should only be relied on for debugging

§Pitfalls

make shure that you are only calling this on the type &dyn Any and NO OTHER TYPE!!!!!. if called on Box, it will return std::box::Box<std::any::Any> (or something similar) instead of the type you want!

Required Methods§

Source

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

gets the type name of Self

Implementors§

Source§

impl<T: Any + 'static> TypeNamed for T