use std::collections::HashMap; use enum_dispatch::enum_dispatch; #[enum_dispatch] #[derive(Hash, Eq, PartialEq, Debug)] pub enum Card {} #[enum_dispatch(Card)] pub trait CardTrait {} struct OmniCard; pub struct Cards { pub inner: HashMap<Card, u8>, }