use std::fmt::Display; use chrono::{DateTime, Local}; use uuid::Uuid; #[derive(Clone)] pub struct Gamenight { pub id: Uuid, pub name: String, pub start_time: DateTime, pub owner_id: Uuid, } impl Display for Gamenight { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, r#" Name: {} When: {}"#, self.name, self.start_time.format("%d-%m-%Y %H:%M")) } }