pub struct Player { /* private fields */ }Expand description
Game-specific player representation. Includes generally immutable information alongside data specific to the replay being parsed.
Implementations§
source§impl Player
impl Player
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Name of the player at the time the replay was recorded. Note that the player may have
changed their name since time of recording. If attempting to uniquely identify players
across replay files, look at Player::steam_id and Player::profile_id instead. The string
is UTF-16 encoded.
sourcepub fn team(&self) -> Team
pub fn team(&self) -> Team
The team the player was assigned to. Currently only head-to-head matchups are supported (max two teams).
sourcepub fn battlegroup(&self) -> Option<u32>
pub fn battlegroup(&self) -> Option<u32>
The pbgid of the battlegroup the player selected, or None if no battlegroup was selected.
For details on what this ID represents please see SelectBattlegroup::pbgid.
sourcepub fn steam_id(&self) -> Option<u64>
pub fn steam_id(&self) -> Option<u64>
The Steam ID of the player, or None if the player is AI. This ID can be used to uniquely
identify a player between replays, and connect them to their Steam profile.
sourcepub fn profile_id(&self) -> Option<u64>
pub fn profile_id(&self) -> Option<u64>
The Relic profile ID of the player, or None if the player is AI. This ID can be used to
uniquely identify a player between replays, and can be used to query statistical information
about the player from Relic’s stats API.
sourcepub fn messages(&self) -> Vec<Message>
pub fn messages(&self) -> Vec<Message>
A list of all messages sent by the player in the match. Sorted chronologically from first to last.
sourcepub fn commands(&self) -> Vec<Command>
pub fn commands(&self) -> Vec<Command>
A list of all commands executed by the player in the match. Sorted chronologically from first to last.
sourcepub fn build_commands(&self) -> Vec<Command>
pub fn build_commands(&self) -> Vec<Command>
A list of only build-related commands executed by the player in the match. A build command is any that enqueues the construction of a new unit or upgrade. Sorted chronologically from first to last.
sourcepub fn battlegroup_commands(&self) -> Vec<Command>
pub fn battlegroup_commands(&self) -> Vec<Command>
A list of only battlegroup-related commands executed by the player in the match. A battlegroup command is any that involves the select or use of battlegroups and their abilities.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Player
impl RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl UnwindSafe for Player
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)