[−][src]Enum mem6_common::WsMessage
WsMessage enum for WebSocket
Variants
MsgDummy
Fields of MsgDummy
dummy: Stringanything
Request WebSocket Uid - first message to WebSocket server
Fields of MsgRequestWsUid
response from WebSocket server for first message
MsgPing
Fields of MsgPing
msg_id: u32random msg_id
MsgPong
Fields of MsgPong
msg_id: u32random msg_id
join the group
Fields of MsgJoin
player1 initialize the game data and sends it to all players I will send json string to not confuse the server with vectors
Fields of MsgStartGame
my_ws_uid: usizews client instance unique id. To not listen the echo to yourself.
players_ws_uid: Stringjson of vector of players for the server to know whom to send msg
players: Stringjson of vector of players with nicknames and order data
card_grid_data: Stringvector of cards status
game_config: Stringjson of game_config
game_name: Stringgame name
player click
Fields of MsgClick1stCard
player click success
Fields of MsgClick2ndCard
drink end
Fields of MsgDrinkEnd
Game Over
Fields of MsgGameOver
Play Again
Fields of MsgPlayAgain
player change
Fields of MsgTakeTurn
acknowledge msg, that the receiver received the message
Fields of MsgAck
my_ws_uid: usizemsg sender uid
players_ws_uid: Stringsend msg to this players
msg_id: usizemsg id (random)
msg_ack_kind: MsgAckKindkind of ack msg
ask player1 for resync
Fields of MsgAskPlayer1ForResync
all game data
Fields of MsgAllGameData
my_ws_uid: usizews client instance unique id. To not listen the echo to yourself.
players_ws_uid: Stringonly the players that reconnected
players: Stringjson of vector of players with nicknames and order data
card_grid_data: Stringvector of cards status
card_index_of_first_click: usizehave to send all the state of the game
card_index_of_second_click: usizehave to send all the state of the game
player_turn: usizeplayer turn
game_status: GameStatusgame status
Trait Implementations
impl Clone for WsMessage[src]
impl<'de> Deserialize<'de> for WsMessage[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Serialize for WsMessage[src]
Auto Trait Implementations
impl RefUnwindSafe for WsMessage
impl Send for WsMessage
impl Sync for WsMessage
impl Unpin for WsMessage
impl UnwindSafe for WsMessage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,