pub enum ServerMessage {
Show 31 variants
Pong,
AuthResult {
success: bool,
player_id: Option<String>,
reconnected: Option<bool>,
error: Option<String>,
features: Vec<String>,
art_base_url: Option<String>,
},
SessionTakenOver,
RoomList {
rooms: Vec<RoomInfo>,
},
PlayerList {
players: Vec<PlayerInfo>,
},
RoomCreated {
room_id: String,
room_name: String,
room: RoomInfo,
resume_token: Option<String>,
},
RoomResumed {
room: RoomInfo,
},
PlayerJoined {
room_id: String,
username: String,
},
PlayerLeft {
room_id: String,
username: String,
},
PlayerConnected {
username: String,
},
PlayerDisconnected {
username: String,
},
ReadyStateChanged {
username: String,
ready: bool,
},
RoomUpdate {
room: RoomInfo,
},
GameStarted {
room_id: String,
game_id: String,
player_order: Vec<String>,
player_decks: Vec<PlayerDeckInfo>,
starting_life: i32,
},
StateUpdate {
from_player: String,
state: Value,
},
TurnChanged {
from_player: String,
new_active_player: String,
turn_number: u32,
},
GameAborted {
room_id: String,
},
Error {
code: String,
message: String,
},
ServerShuttingDown {
reconnect_in_s: u32,
},
RoomTransport {
room_id: String,
ice_servers: Vec<IceServer>,
host: Option<TransportMember>,
members: Vec<TransportMember>,
},
PeerSignal {
from: String,
payload: Value,
},
ChatMessage(ChatMessage),
ChatHistory {
scope: ChatScope,
room_id: Option<String>,
messages: Vec<ChatMessage>,
},
RoomInvite {
from: String,
room: RoomInfo,
password: Option<String>,
},
QueueStatus {
queued: bool,
brackets: Vec<u8>,
waiting: Vec<QueueBracketCount>,
},
QueueStepOffer {
down: Option<u8>,
up: Option<u8>,
waiting: Vec<QueueBracketCount>,
},
QueueBotFillOffer {
players: u32,
},
MatchProposal {
bracket: u8,
pod_size: u8,
players: u32,
expires_s: u32,
busy: u32,
},
MatchProposalAccepts {
accepted: u32,
},
TableCall {
room_id: String,
host: String,
bracket: u8,
seats: u8,
pod_size: u8,
expires_s: u32,
},
MatchFound {
room: RoomInfo,
host: String,
bracket: u8,
deck_name: String,
resume_token: Option<String>,
},
}Variants§
Pong
AuthResult
Fields
SessionTakenOver
RoomList
PlayerList
Fields
players: Vec<PlayerInfo>RoomCreated
RoomResumed
PlayerJoined
PlayerLeft
PlayerConnected
PlayerDisconnected
ReadyStateChanged
RoomUpdate
GameStarted
Fields
player_decks: Vec<PlayerDeckInfo>StateUpdate
TurnChanged
GameAborted
Error
ServerShuttingDown
RoomTransport
The room’s data-plane roster. Sent only to room members.
PeerSignal
A signalling blob from a room member. from is relay-attested.
ChatMessage(ChatMessage)
ChatHistory
RoomInvite
QueueStatus
QueueStepOffer
No full pod formed at the queued brackets yet. The client asks the
player whether to take an adjacent one; AcceptQueueStep or
SetQueueSteps widens it.
QueueBotFillOffer
Players share a bracket but the pod is not full. The client asks
whether to start with Manabot in the empty seats; AcceptBotFill
opts in. A partial pod forms only when every member opted in.
MatchProposal
A pod formed. The relay seats it once every member sent AcceptMatch
and left any local game; busy members were in one when it formed.
MatchProposalAccepts
How many members of the pending MatchProposal have accepted. Sent to
every member after each accept.
TableCall
An open table at one of the player’s queued brackets needs players.
The first AnswerTableCall joins take the seats; extra joins open a
new table that is called the same way.
MatchFound
Trait Implementations§
Source§impl Clone for ServerMessage
impl Clone for ServerMessage
Source§fn clone(&self) -> ServerMessage
fn clone(&self) -> ServerMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more