summaryrefslogtreecommitdiff
path: root/server/protocol/src/registry.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-20 21:45:18 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-20 22:57:39 +0200
commit9ddb4d7786509bf5995bd5e254c611a05ea50eba (patch)
treede606bbb04f56e201eebdbf1a075595149441998 /server/protocol/src/registry.rs
parentf2836d359942a6b42b1db9d1fd7624499798d925 (diff)
downloadhurrycurry-9ddb4d7786509bf5995bd5e254c611a05ea50eba.tar
hurrycurry-9ddb4d7786509bf5995bd5e254c611a05ea50eba.tar.bz2
hurrycurry-9ddb4d7786509bf5995bd5e254c611a05ea50eba.tar.zst
reg: move structs to protocol crate
Diffstat (limited to 'server/protocol/src/registry.rs')
-rw-r--r--server/protocol/src/registry.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/protocol/src/registry.rs b/server/protocol/src/registry.rs
new file mode 100644
index 00000000..f1e9a083
--- /dev/null
+++ b/server/protocol/src/registry.rs
@@ -0,0 +1,20 @@
+use serde::{Deserialize, Serialize};
+
+#[derive(Debug, Serialize)]
+pub struct Entry {
+ pub name: String,
+ pub address: Vec<String>,
+ pub players_online: usize,
+ pub last_game: i64,
+ pub version: (usize, usize),
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+pub struct Submission {
+ pub secret: u128,
+ pub name: String,
+ pub players: usize,
+ pub last_game: i64,
+ pub version: (usize, usize),
+ pub uri: String,
+}