diff options
author | metamuffin <metamuffin@disroot.org> | 2025-10-06 14:04:52 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-10-06 14:04:52 +0200 |
commit | a5814a2a81c0ea7bcf6d56626ff7167af78d63a6 (patch) | |
tree | 7896236b46c4c696aace17816cf71e433156355f /server/protocol/src/book.rs | |
parent | f4bce8374988cd0f18d21bf43c649bc4b34ccf74 (diff) | |
download | hurrycurry-a5814a2a81c0ea7bcf6d56626ff7167af78d63a6.tar hurrycurry-a5814a2a81c0ea7bcf6d56626ff7167af78d63a6.tar.bz2 hurrycurry-a5814a2a81c0ea7bcf6d56626ff7167af78d63a6.tar.zst |
Collapse anywhere passive recipes
Diffstat (limited to 'server/protocol/src/book.rs')
-rw-r--r-- | server/protocol/src/book.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/protocol/src/book.rs b/server/protocol/src/book.rs index 7c529f22..1654e014 100644 --- a/server/protocol/src/book.rs +++ b/server/protocol/src/book.rs @@ -69,8 +69,20 @@ pub struct DiagramEdge { pub src: usize, pub dst: usize, pub label: Option<Message>, + pub style: EdgeStyle, } +#[derive(Debug, Clone, Serialize, Deserialize)] +pub enum EdgeStyle { + Regular, + ProcessPassive, +} + +impl EdgeStyle { + pub fn is_regular(&self) -> bool { + matches!(self, Self::Regular) + } +} impl NodeStyle { pub fn is_procuct(&self) -> bool { matches!( |