pub struct GameSnapshot {
pub game_id: String,
pub state: GameState,
pub grid: Grid,
pub players: Vec<PlayerInfo>,
pub spectators: Vec<SpectatorInfo>,
pub current_turn: i64,
pub round: u8,
pub max_rounds: u8,
pub used_words: Vec<String>,
pub timer_vote_state: TimerVoteState,
pub your_player: Option<PlayerInfo>,
pub timer_expiration_time: Option<DateTime<Utc>>,
}Expand description
Complete snapshot of the game state.
Fields§
§game_id: String§state: GameState§grid: Grid§players: Vec<PlayerInfo>§spectators: Vec<SpectatorInfo>§current_turn: i64§round: u8§max_rounds: u8§used_words: Vec<String>§timer_vote_state: TimerVoteState§your_player: Option<PlayerInfo>Your player info (for the receiving client)
timer_expiration_time: Option<DateTime<Utc>>When the turn timer expires (if active)
Trait Implementations§
Source§impl Clone for GameSnapshot
impl Clone for GameSnapshot
Source§fn clone(&self) -> GameSnapshot
fn clone(&self) -> GameSnapshot
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 GameSnapshot
impl Debug for GameSnapshot
Source§impl<'de> Deserialize<'de> for GameSnapshot
impl<'de> Deserialize<'de> for GameSnapshot
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 GameSnapshot
impl RefUnwindSafe for GameSnapshot
impl Send for GameSnapshot
impl Sync for GameSnapshot
impl Unpin for GameSnapshot
impl UnwindSafe for GameSnapshot
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