use downcast::Any; pub trait Module : Any { fn box_clone(&self) -> Box; } impl Clone for Box { fn clone(&self) -> Box { self.box_clone() } } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Hash)] pub enum ModuleType { Mining, Engines, Dashboard, Navigation, } downcast!(Module);