pub enum LobbyChange {
PlayerJoined {
player: LobbyPlayerInfo,
},
PlayerLeft {
player_id: i64,
reason: Option<String>,
},
PlayerConnectionChanged {
player_id: i64,
is_connected: bool,
},
GameStateChanged {
game_id: String,
state: GameState,
},
PoolUpdated {
game_id: String,
pool_count: u32,
},
HostChanged {
new_host_id: String,
},
}Expand description
Changes to lobby state (for delta updates instead of full snapshots).
Variants§
PlayerJoined
A player joined the lobby
Fields
§
player: LobbyPlayerInfoPlayerLeft
A player left the lobby
PlayerConnectionChanged
A player’s connection state changed
GameStateChanged
A game’s state changed
PoolUpdated
Pool count updated for a game
HostChanged
Host changed
Trait Implementations§
Source§impl Clone for LobbyChange
impl Clone for LobbyChange
Source§fn clone(&self) -> LobbyChange
fn clone(&self) -> LobbyChange
Returns a duplicate of the value. Read more
1.0.0 · 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 LobbyChange
impl Debug for LobbyChange
Source§impl<'de> Deserialize<'de> for LobbyChange
impl<'de> Deserialize<'de> for LobbyChange
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 LobbyChange
impl RefUnwindSafe for LobbyChange
impl Send for LobbyChange
impl Sync for LobbyChange
impl Unpin for LobbyChange
impl UnwindSafe for LobbyChange
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