aboutsummaryrefslogtreecommitdiff
path: root/karlcommon/src
diff options
context:
space:
mode:
authormetamuffin <yvchraiqi@protonmail.com>2022-06-11 18:55:54 +0200
committermetamuffin <yvchraiqi@protonmail.com>2022-06-11 18:55:54 +0200
commit163052cd25d927c9437a2234befd22c9d143c4d4 (patch)
tree5181ce8ee7755024cba77d3172c637ff0e7c59df /karlcommon/src
parentea37afe9ae9a1607fa3b6f365b9307c579c45b8d (diff)
downloadkarlender-163052cd25d927c9437a2234befd22c9d143c4d4.tar
karlender-163052cd25d927c9437a2234befd22c9d143c4d4.tar.bz2
karlender-163052cd25d927c9437a2234befd22c9d143c4d4.tar.zst
redundant Instance
Diffstat (limited to 'karlcommon/src')
-rw-r--r--karlcommon/src/protocol.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/karlcommon/src/protocol.rs b/karlcommon/src/protocol.rs
index de65802..25dfc66 100644
--- a/karlcommon/src/protocol.rs
+++ b/karlcommon/src/protocol.rs
@@ -8,7 +8,7 @@ pub enum ClientboundPacket {
Handshake { version: String },
Error(ProtoError),
TaskList(Vec<Task>),
- InstanceList(Vec<Instance>),
+ InstanceList(Vec<Range<Option<i64>>>),
Sync,
}
@@ -52,17 +52,13 @@ pub enum Schedule {
Dynamic {
priority: f64,
scheduled: Option<i64>,
- deadline: Option<Condition>,
+ duration: i64,
+ condition: Condition, // duration, during which the task should be scheduled
},
Condition(Condition),
Static(Range<i64>),
}
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct Instance {
- pub of: u64,
- pub at: Range<Option<i64>>,
-}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]