pub struct UserPersona {Show 18 fields
pub steam_id: SteamID,
pub player_name: String,
pub persona_state: EPersonaState,
pub persona_state_flags: u32,
pub avatar_hash: Option<String>,
pub game_name: Option<String>,
pub game_id: Option<u64>,
pub last_logon: Option<DateTime<Utc>>,
pub last_logoff: Option<DateTime<Utc>>,
pub last_seen_online: Option<DateTime<Utc>>,
pub rich_presence: HashMap<String, String>,
pub steam_player_group: Option<String>,
pub rich_presence_status: Option<String>,
pub game_map: Option<String>,
pub game_score: Option<String>,
pub num_players: Option<u32>,
pub unread_count: u32,
pub last_message_time: u32,
}Expand description
User persona information.
Fields§
§steam_id: SteamID§player_name: String§persona_state: EPersonaState§persona_state_flags: u32§avatar_hash: Option<String>§game_name: Option<String>§game_id: Option<u64>§last_logon: Option<DateTime<Utc>>§last_logoff: Option<DateTime<Utc>>§last_seen_online: Option<DateTime<Utc>>§rich_presence: HashMap<String, String>§steam_player_group: Option<String>Steam player group ID (lobby/party) from rich presence
rich_presence_status: Option<String>Status string from rich presence (e.g. “Competitive Mirage [ 3 : 6 ]”)
game_map: Option<String>Map name from rich presence (e.g. “de_mirage”)
game_score: Option<String>Game score from rich presence (e.g. “[ 3 : 6 ]”)
num_players: Option<u32>Number of players/slots in lobby/party from rich presence
unread_count: u32§last_message_time: u32Implementations§
Source§impl UserPersona
impl UserPersona
Sourcepub fn avatar_url(&self, size: &str) -> Option<String>
pub fn avatar_url(&self, size: &str) -> Option<String>
Get the URL for the user’s avatar.
Size can be “icon” (32x32), “medium” (64x64), or “full” (184x184).
Sourcepub fn merge(&mut self, other: &UserPersona)
pub fn merge(&mut self, other: &UserPersona)
Merge another persona data into this one, overwriting only non-empty/Some values.
Trait Implementations§
Source§impl Clone for UserPersona
impl Clone for UserPersona
Source§fn clone(&self) -> UserPersona
fn clone(&self) -> UserPersona
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UserPersona
impl Debug for UserPersona
Auto Trait Implementations§
impl Freeze for UserPersona
impl RefUnwindSafe for UserPersona
impl Send for UserPersona
impl Sync for UserPersona
impl Unpin for UserPersona
impl UnsafeUnpin for UserPersona
impl UnwindSafe for UserPersona
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more