pub enum Kind { Info, Warning, Error, } impl std::fmt::Display for Kind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Kind::Info => f.write_str("info"), Kind::Warning => f.write_str("warning"), Kind::Error => f.write_str("error"), } } } pub struct Notification { pub kind: Kind, pub message: String, }