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) -> SteamID
pub fn from_individual_account_id(account_id: u32) -> SteamID
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) -> SteamID
pub fn from_steam_id64(id: u64) -> SteamID
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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SteamID
impl<'de> Deserialize<'de> for SteamID
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SteamID, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SteamID, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Serialize for SteamID
impl Serialize for SteamID
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl Copy for SteamID
impl Eq for SteamID
impl StructuralPartialEq for SteamID
Auto Trait Implementations§
impl Freeze for SteamID
impl RefUnwindSafe for SteamID
impl Send for SteamID
impl Sync for SteamID
impl Unpin for SteamID
impl UnsafeUnpin for SteamID
impl UnwindSafe for SteamID
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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