Improve messages formatting

This commit is contained in:
Pierre HUBERT 2022-09-11 17:03:13 +02:00
parent 481f36752d
commit 36a573e563

View File

@ -1,7 +1,7 @@
use std::sync::Arc;
use actix::prelude::*;
use actix::{Actor, Handler, StreamHandler};
use actix::prelude::*;
use actix_web_actors::ws;
use actix_web_actors::ws::{CloseCode, CloseReason, Message, ProtocolError, WebsocketContext};
use uuid::Uuid;
@ -20,6 +20,7 @@ pub enum StartMode {
}
#[derive(serde::Deserialize, Debug)]
#[serde(tag = "type")]
pub enum ClientMessage {
StopGame,
}
@ -27,6 +28,7 @@ pub enum ClientMessage {
#[derive(Message)]
#[rtype(result = "()")]
#[derive(serde::Serialize, Debug)]
#[serde(tag = "type")]
pub enum ServerMessage {
WaitingForOtherPlayer,
QueryBoatsLayout(GameRules),