aboutsummaryrefslogtreecommitdiff
path: root/karlcommon/src/misc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'karlcommon/src/misc.rs')
-rw-r--r--karlcommon/src/misc.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/karlcommon/src/misc.rs b/karlcommon/src/misc.rs
index 583ed27..4d181ba 100644
--- a/karlcommon/src/misc.rs
+++ b/karlcommon/src/misc.rs
@@ -1,4 +1,4 @@
-use crate::Property;
+use crate::{Property, Task};
impl Property {
pub const VALUES: &'static [Property] = &[
@@ -28,3 +28,15 @@ impl Property {
}
}
}
+
+impl Task {
+ pub fn default_with_id(id: u64) -> Self {
+ Self {
+ id,
+ name: Default::default(),
+ description: Default::default(),
+ tags: Default::default(),
+ schedule: crate::Schedule::Never,
+ }
+ }
+}