pub enum ClientMessage {
Show 17 variants
Authenticate {
username: String,
password: String,
service: bool,
},
Ping,
ListRooms,
ListPlayers,
CreateRoom {
room_name: String,
max_players: u8,
format: GameFormat,
protocol_version: u32,
hosted: bool,
engine: EngineKind,
draft_config: Option<DraftConfig>,
sealed_config: Option<SealedConfig>,
official_key: Option<String>,
password: Option<String>,
reconnect_timeout_s: Option<u32>,
},
JoinRoom {
room_id: String,
observe: bool,
as_bot: bool,
password: Option<String>,
},
ResumeRoom(ResumeRoomRequest),
LeaveRoom,
SetReady {
ready: bool,
},
SetDeckSelection {
deck_name: String,
deck: Deck,
commander_name: Option<String>,
avatar: Option<String>,
},
SetFormat {
format: GameFormat,
},
SetMaxPlayers {
max_players: u8,
},
StartGame {
format: Option<GameFormat>,
},
EndGame {
game_id: String,
},
RequestResync,
BroadcastState {
state: Value,
target_player: Option<String>,
},
TurnChange {
new_active_player: String,
turn_number: u32,
},
}Variants§
Authenticate
Ping
ListRooms
ListPlayers
CreateRoom
Fields
§
format: GameFormat§
engine: EngineKind§
draft_config: Option<DraftConfig>§
sealed_config: Option<SealedConfig>JoinRoom
ResumeRoom(ResumeRoomRequest)
LeaveRoom
SetReady
SetDeckSelection
SetFormat
Fields
§
format: GameFormatSetMaxPlayers
StartGame
Fields
§
format: Option<GameFormat>EndGame
RequestResync
BroadcastState
TurnChange
Trait Implementations§
Source§impl Clone for ClientMessage
impl Clone for ClientMessage
Source§fn clone(&self) -> ClientMessage
fn clone(&self) -> ClientMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientMessage
impl Debug for ClientMessage
Source§impl<'de> Deserialize<'de> for ClientMessage
impl<'de> Deserialize<'de> for ClientMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ClientMessage
impl RefUnwindSafe for ClientMessage
impl Send for ClientMessage
impl Sync for ClientMessage
impl Unpin for ClientMessage
impl UnsafeUnpin for ClientMessage
impl UnwindSafe for ClientMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more