pub struct Player {Show 13 fields
pub steamid: String,
pub name: String,
pub clan: String,
pub observer_slot: Option<u8>,
pub xp_overload_level: Option<u32>,
pub team: PlayerTeam,
pub activity: PlayerActivity,
pub state: PlayerState,
pub match_stats: MatchStats,
pub weapons: BTreeMap<String, Weapon>,
pub spectarget: String,
pub position: String,
pub forward: String,
}Expand description
A single player snapshot.
Fields§
§steamid: String64-bit SteamID. Empty for bots.
name: StringIn-game display name.
clan: StringClan tag, may be empty.
observer_slot: Option<u8>Observer slot number (0..=9 in standard 5v5).
xp_overload_level: Option<u32>XP overload level (CS2 progression).
team: PlayerTeamSide the player belongs to.
activity: PlayerActivityActivity (menu / playing / textinput).
state: PlayerStateVolatile per-tick state (health, armor, money, …).
match_stats: MatchStatsPer-match aggregate statistics.
weapons: BTreeMap<String, Weapon>Inventory keyed by weapon slot id (e.g. "weapon_0").
spectarget: StringSteamID of the player currently being spectated (when activity = playing is false).
position: StringWorld position vector, formatted by CS2 as "x, y, z".
forward: StringForward look direction vector, formatted by CS2 as "x, y, z".
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Player
impl<'de> Deserialize<'de> for Player
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
impl StructuralPartialEq for Player
Auto Trait Implementations§
impl Freeze for Player
impl RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more