gardesk/garnotify / 2ba5815

Browse files

impl Default for Notification

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
2ba581539c7cd4a5f0ac544a89792983c5717de0
Parents
6cb7410
Tree
ecebc1d

1 changed file

StatusFile+-
M garnotify/src/notification/types.rs 17 0
garnotify/src/notification/types.rsmodified
@@ -285,6 +285,23 @@ impl Notification {
285285
     }
286286
 }
287287
 
288
+impl Default for Notification {
289
+    fn default() -> Self {
290
+        Self {
291
+            id: 0,
292
+            app_name: String::new(),
293
+            replaces_id: 0,
294
+            app_icon: String::new(),
295
+            summary: String::new(),
296
+            body: String::new(),
297
+            actions: Vec::new(),
298
+            hints: Hints::default(),
299
+            expire_timeout: -1,
300
+            created_at: Instant::now(),
301
+        }
302
+    }
303
+}
304
+
288305
 /// Timeout configuration per urgency level
289306
 #[derive(Debug, Clone)]
290307
 pub struct UrgencyTimeouts {