summaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-10-20 23:05:54 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-10-20 23:05:54 +0800
commitff590ac70e7a858a64d7a4835a22f6d94b31b886 (patch)
tree393b93be66011f43083d9e789434416402ed95b1 /src/client.rs
init
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client.rs b/src/client.rs
new file mode 100644
index 0000000..7919b94
--- /dev/null
+++ b/src/client.rs
@@ -0,0 +1,15 @@
+use rand::Rng;
+use serde::{Deserialize, Serialize};
+
+#[derive(Hash, Deserialize, Serialize, Clone, Copy)]
+pub struct Client {
+ id: u32,
+}
+
+impl Default for Client {
+ fn default() -> Self {
+ Self {
+ id: rand::rng().random(),
+ }
+ }
+}