use std::any::{type_name, TypeId}; pub struct Class { id: TypeId, name: &'static str, } impl Class { pub fn New() -> Self { Self { id: TypeId::of::(), name: type_name::().into(), } } pub fn GetId(&self) -> TypeId { self.id } pub fn GetName(&self) -> &'static str { self.name } }