pub struct PlayerInfo {
pub id: u32,
pub player_type: PlayerType,
pub race_requested: Race,
pub race_actual: Option<Race>,
pub difficulty: Option<Difficulty>,
pub ai_build: Option<AIBuild>,
pub player_name: Option<String>,
}
Expand description
Information about player.
Fields§
§id: u32
Player id.
player_type: PlayerType
Player type, can be Participant
, Computer
or Observer
.
race_requested: Race
Requested race, can be random.
race_actual: Option<Race>
Actual race, it’s never random, None
for opponents.
difficulty: Option<Difficulty>
Difficulty, populated only for computer opponents.
ai_build: Option<AIBuild>
AI Build, populated only for computer opponents.
player_name: Option<String>
In-game name of player.
Trait Implementations§
Source§impl Clone for PlayerInfo
impl Clone for PlayerInfo
Source§fn clone(&self) -> PlayerInfo
fn clone(&self) -> PlayerInfo
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for PlayerInfo
impl RefUnwindSafe for PlayerInfo
impl Send for PlayerInfo
impl Sync for PlayerInfo
impl Unpin for PlayerInfo
impl UnwindSafe for PlayerInfo
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