pub struct GameState<'a> {
current_round: u64,
current_phase: LobbyPhase,
next_phases: Vec<LobbyPhase>,
lobby_id: LobbyId,
is_paused: bool,
players: Vec<Player<'a>>,
matches: Vec<[PlayerId; 2]>,
}Fields§
§current_round: u64§current_phase: LobbyPhase§next_phases: Vec<LobbyPhase>§lobby_id: LobbyId§is_paused: bool§players: Vec<Player<'a>>§matches: Vec<[PlayerId; 2]>Implementations§
Source§impl<'a> GameState<'a>
impl<'a> GameState<'a>
Sourcepub fn new_from_lobby_state(lobby_state: &'a LobbyState) -> Self
pub fn new_from_lobby_state(lobby_state: &'a LobbyState) -> Self
This only works on games that have already started!
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GameState<'a>
impl<'a> RefUnwindSafe for GameState<'a>
impl<'a> Send for GameState<'a>
impl<'a> Sync for GameState<'a>
impl<'a> Unpin for GameState<'a>
impl<'a> UnwindSafe for GameState<'a>
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