summaryrefslogblamecommitdiffstats
path: root/src/notification.rs
blob: 22837611fefc2dd0c08799f505f2fa4d0a42427b (plain) (tree)



















                                                                        
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,
}