pub enum ClientMessage {
Show 26 variants
Authenticate {
username: String,
password: String,
service: bool,
identity: Option<IdentityProof>,
client_platform: ClientPlatform,
client_version: Option<String>,
engine_gate: EngineGate,
},
Ping,
ListRooms,
ListPlayers,
SetLocalGame {
kind: Option<LocalGameKind>,
},
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>,
table_style: Option<String>,
},
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_url: Option<String>,
},
SetFormat {
format: GameFormat,
},
SetMaxPlayers {
max_players: u8,
},
StartGame {
format: Option<GameFormat>,
},
EndGame {
game_id: String,
},
ReportEngineStats {
game_id: Option<String>,
stats: EnginePlayStats,
},
ReportGameOutcome {
game_id: String,
outcome: GameOutcomeReport,
},
RequestResync,
BroadcastState {
state: Value,
target_player: Option<String>,
},
TurnChange {
new_active_player: String,
turn_number: u32,
},
ReportTransport {
game_id: String,
seats: Vec<SeatTransportReport>,
},
AnnounceTransport {
endpoint: Option<TransportEndpoint>,
},
SignalPeer {
to: String,
payload: Value,
},
ReportPlaneQuality {
report: PlaneQualityReport,
},
SendChat {
scope: ChatScope,
text: String,
},
InviteToRoom {
username: String,
},
}Variants§
Authenticate
Fields
username: StringLegacy name field, read only when identity carries no token.
The session name is the handle claim of identity.token
(identity_token); remove this field in the next major.
identity: Option<IdentityProof>client_platform: ClientPlatformclient_version: Option<String>The client’s app version (APP_VERSION), when it sends one. Absent
means a build older than the one that started reporting it, which is
how the relay decides what wire features that seat can handle.
engine_gate: EngineGatePing
ListRooms
ListPlayers
SetLocalGame
The session entered or left a game running on its own machine. None
clears it. Such a game opens no room and sends no state, so the relay
has no other way to know it is happening.
Fields
kind: Option<LocalGameKind>CreateRoom
Fields
format: GameFormatengine: EngineKinddraft_config: Option<DraftConfig>sealed_config: Option<SealedConfig>JoinRoom
ResumeRoom(ResumeRoomRequest)
LeaveRoom
SetReady
SetDeckSelection
Fields
SetFormat
Fields
format: GameFormatSetMaxPlayers
StartGame
Fields
format: Option<GameFormat>EndGame
ReportEngineStats
ReportGameOutcome
How the game ended, from the seat that ran the engine. The relay stopped reading it out of the state stream, which need not pass through it any more.
RequestResync
BroadcastState
TurnChange
ReportTransport
Which transport each seat’s traffic took for this game. Analytics only.
AnnounceTransport
Publishes, or with None withdraws, this session’s data-plane endpoint.
Fields
endpoint: Option<TransportEndpoint>SignalPeer
An opaque signalling blob for a room member, named by username.
ReportPlaneQuality
How one direct-plane attempt turned out, sent by the seat. Analytics only.
Fields
report: PlaneQualityReportSendChat
InviteToRoom
Trait Implementations§
Source§impl Clone for ClientMessage
impl Clone for ClientMessage
Source§fn clone(&self) -> ClientMessage
fn clone(&self) -> ClientMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more