diff --git a/odilia-notify/src/action.rs b/odilia-notify/src/action.rs index 646d0838..560fe0bf 100644 --- a/odilia-notify/src/action.rs +++ b/odilia-notify/src/action.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct Action { pub name: String, pub method: String, diff --git a/odilia-notify/src/notification.rs b/odilia-notify/src/notification.rs index 7fb011a7..17e08481 100644 --- a/odilia-notify/src/notification.rs +++ b/odilia-notify/src/notification.rs @@ -8,7 +8,7 @@ use crate::action::Action; use crate::urgency::Urgency; use itertools::Itertools; -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct Notification { pub app_name: String, pub title: String, diff --git a/odilia-notify/src/urgency.rs b/odilia-notify/src/urgency.rs index 563dabec..7924a37e 100644 --- a/odilia-notify/src/urgency.rs +++ b/odilia-notify/src/urgency.rs @@ -3,7 +3,21 @@ use zbus::zvariant::{OwnedValue, Type, Value}; /// A priority/urgency level. /// https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#urgency-levels -#[derive(Clone, Copy, Debug, Type, Serialize, Deserialize, Default, Value, OwnedValue)] +#[derive( + Clone, + Copy, + Debug, + Type, + Serialize, + Deserialize, + Default, + Value, + OwnedValue, + Eq, + PartialEq, + PartialOrd, + Ord, +)] #[zvariant(signature = "y")] #[repr(u8)] pub enum Urgency {