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,
published_deck_id: Option<String>,
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
Fields
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<ClientMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ClientMessage
impl Serialize for ClientMessage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.