diff options
author | metamuffin <yvchraiqi@protonmail.com> | 2022-06-10 10:59:47 +0200 |
---|---|---|
committer | metamuffin <yvchraiqi@protonmail.com> | 2022-06-10 10:59:47 +0200 |
commit | 6f6db73a126057514912c5e6b372ef225a1065b7 (patch) | |
tree | 22518de3c0213d85166aa53f0fa476a6d8e2d780 /karld/src/protocol.rs | |
parent | 3238f8517097745032e19b3e26f57f0465a00b28 (diff) | |
download | karlender-6f6db73a126057514912c5e6b372ef225a1065b7.tar karlender-6f6db73a126057514912c5e6b372ef225a1065b7.tar.bz2 karlender-6f6db73a126057514912c5e6b372ef225a1065b7.tar.zst |
moved code to another crate
Diffstat (limited to 'karld/src/protocol.rs')
-rw-r--r-- | karld/src/protocol.rs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/karld/src/protocol.rs b/karld/src/protocol.rs deleted file mode 100644 index 40ab0b2..0000000 --- a/karld/src/protocol.rs +++ /dev/null @@ -1,34 +0,0 @@ -use crate::condition::Condition; -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(tag = "type", content = "data", rename_all = "snake_case")] -pub enum ClientboundPacket { - Handshake { version: String }, - Error(String), - DownloadResponse(Vec<Task>), -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(tag = "type", content = "data", rename_all = "snake_case")] -pub enum ServerboundPacket { - Download, - UpdateTask(Task), - RemoveTask(u64), -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct Task { - pub id: u64, - pub name: String, - pub description: String, - - pub tags: Vec<String>, - pub priority: f64, - - pub completed: Option<u64>, - pub scheduled: Option<u64>, - - pub occurence: Option<Condition>, - pub deadline: Option<Condition>, -} |