1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
pub enum MessageType { Info, Warning, Error, } pub struct MessageAlert<'a> { pub title: &'a str, pub text: &'a str, pub typ: MessageType, } pub struct MessageConfirm<'a> { pub title: &'a str, pub text: &'a str, pub typ: MessageType, }