pub struct SteamID {
pub universe: Universe,
pub account_type: AccountType,
pub instance: u32,
pub account_id: u32,
}Expand description
Represents a Steam ID with all its components.
Fields§
§universe: UniverseThe Steam universe this ID belongs to.
account_type: AccountTypeThe type of account this ID represents.
instance: u32The instance of the account.
account_id: u32The unique account identifier.
Implementations§
Source§impl SteamID
impl SteamID
Sourcepub fn from_individual_account_id(account_id: u32) -> Self
pub fn from_individual_account_id(account_id: u32) -> Self
Creates a SteamID from an individual account ID.
This is a convenience method for creating a typical user SteamID in the public universe with a desktop instance.
Sourcepub fn from_steam_id64(id: u64) -> Self
pub fn from_steam_id64(id: u64) -> Self
Parse a SteamID from a 64-bit integer.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns whether Steam would consider this ID to be “valid”.
This does not check whether the given ID belongs to a real account, nor does it check that the given ID is for an individual account or in the public universe.
Sourcepub fn is_valid_individual(&self) -> bool
pub fn is_valid_individual(&self) -> bool
Returns whether this SteamID is valid and belongs to an individual user in the public universe with a desktop instance.
This is what most people think of when they think of a SteamID. Does not check whether the account actually exists.
Sourcepub fn is_group_chat(&self) -> bool
pub fn is_group_chat(&self) -> bool
Checks whether this ID is for a legacy group chat.
Sourcepub fn steam_id64(&self) -> u64
pub fn steam_id64(&self) -> u64
Renders the ID in 64-bit decimal format.