use std::fmt::Display; use gamenight_api_client_rs::models; use uuid::Uuid; #[derive(Clone)] pub struct Game { pub id: Uuid, pub name: String } impl From for Game { fn from(game: models::Game) -> Self { Self { id: Uuid::parse_str(&game.id).unwrap(), name: game.name } } } impl Display for Game { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "Name: {}", self.name) } }