Improve messages formatting
This commit is contained in:
parent
481f36752d
commit
36a573e563
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user