use std::{any::{TypeId, type_name}, alloc::Layout}; #[derive(Clone, Debug)] pub struct ComponentInfo { pub type_id: TypeId, pub name: String, pub layout: Layout, } impl ComponentInfo { pub fn new() -> Self { Self { type_id: TypeId::of::(), name: type_name::().to_string(), layout: Layout::new::(), } } }