diff options
| author | stale <redkugelblitzin@gmail.com> | 2022-05-29 20:45:03 -0300 | 
|---|---|---|
| committer | stale <redkugelblitzin@gmail.com> | 2022-05-29 20:45:03 -0300 | 
| commit | bcd5764aa03e128e06c355272b7b81eac8d4501d (patch) | |
| tree | 44e1076c24680325a02317c29d4838c547a6c49d /src/types.rs | |
| parent | 8e8fb7c45e8088843b71cb55fede723b2f9c7ff2 (diff) | |
improved pubs listing, many minor fixes
Diffstat (limited to 'src/types.rs')
| -rw-r--r-- | src/types.rs | 15 | 
1 files changed, 10 insertions, 5 deletions
| diff --git a/src/types.rs b/src/types.rs index 84e7d46..d467982 100644 --- a/src/types.rs +++ b/src/types.rs @@ -10,6 +10,7 @@ use std::{  };  use warp::ws::Message;  use tokio::sync::RwLock; +use serde::Serialize;  use crate::minesweeper;  #[derive(Debug, Clone)] @@ -23,15 +24,19 @@ pub struct Config {      pub socket_addr: SocketAddr,  } -#[derive(Debug)] -pub struct Room { +#[derive(Debug, Serialize)] +pub struct RoomConf {      pub name: String, -    pub players: PlayerMap, -    pub peer_limit: usize, +    pub player_cap: usize,      pub public: bool, +    pub board_conf: minesweeper::BoardConf, +} + +pub struct Room { +    pub conf: RoomConf, +    pub players: PlayerMap,      pub driver: tokio::task::JoinHandle<()>,      pub cmd_stream: CmdTx, -    pub board_conf: minesweeper::BoardConf,  }  #[derive(Debug)] | 
