diff options
author | metamuffin <metamuffin@disroot.org> | 2025-09-27 17:34:55 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-09-27 17:35:01 +0200 |
commit | 7ffc399d47ec9a3c161abeafe9e3591cbf15a227 (patch) | |
tree | c6b16d588e65dd17ff090640f945763a412caa02 /server/protocol/src/book.rs | |
parent | 001c0c2e00082a87fb15754003f6b01a1b4fb89d (diff) | |
download | hurrycurry-7ffc399d47ec9a3c161abeafe9e3591cbf15a227.tar hurrycurry-7ffc399d47ec9a3c161abeafe9e3591cbf15a227.tar.bz2 hurrycurry-7ffc399d47ec9a3c161abeafe9e3591cbf15a227.tar.zst |
remove bincode support everywhere
Diffstat (limited to 'server/protocol/src/book.rs')
-rw-r--r-- | server/protocol/src/book.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/server/protocol/src/book.rs b/server/protocol/src/book.rs index 02dfa425..a8ab5792 100644 --- a/server/protocol/src/book.rs +++ b/server/protocol/src/book.rs @@ -17,16 +17,15 @@ */ use crate::Message; -use bincode::{Decode, Encode}; use glam::Vec2; use serde::{Deserialize, Serialize}; -#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct Book { pub pages: Vec<BookPage>, } -#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] +#[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "snake_case", tag = "page_type")] pub enum BookPage { Cover, @@ -43,21 +42,20 @@ pub enum BookPage { }, } -#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode, Default)] +#[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Diagram { pub nodes: Vec<DiagramNode>, pub edges: Vec<DiagramEdge>, } -#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct DiagramNode { - #[bincode(with_serde)] pub position: Vec2, pub label: Message, pub style: NodeStyle, } -#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub enum NodeStyle { IntermediateProduct, FinalProduct, @@ -66,7 +64,7 @@ pub enum NodeStyle { ProcessInstant, } -#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct DiagramEdge { pub src: usize, pub dst: usize, |