Struct steamidfx::id::Id64 [−][src]
pub struct Id64(pub u64);
Steam Id 64.
Example: 7656119xxxxxxxxxx
.
Implementations
impl Id64
[src]
impl Id64
[src]pub fn info(self) -> Result<Info>
[src]
Get a detailed information about the steam account from the steam id.
Errors
Returns an error if the account type or universe are incorrect.
Panics
Panics when it suddenly becomes impossible to iterate over the bits in the steam id, what in fact can’t happen ever.
pub fn new_simple(
universe: Universe,
authentication_server: u8,
account: u32
) -> Result<Id64>
[src]
universe: Universe,
authentication_server: u8,
account: u32
) -> Result<Id64>
Create a new Id64 with only three parameters passed, all others will be constructed using the default, most commonly used values.
Errors
Throws crate::error::Error
if it is impossible to create such an id due to the width of the values passed.
To avoid this, the values passed must be used according to the specification of the steam id 64.
Also may throw a error if the account_type
passed is invalid.
Example
let old_id = steamidfx::id::Id64(76561197983318796); let info = old_id.info().unwrap(); let new_id = steamidfx::id::Id64::new_simple(info.universe, info.authentication_server, info.account).unwrap(); assert_eq!(old_id, new_id);
pub fn new_full(
universe: Universe,
account_type: AccountType,
account_instance: u32,
authentication_server: u8,
account: u32
) -> Result<Id64>
[src]
universe: Universe,
account_type: AccountType,
account_instance: u32,
authentication_server: u8,
account: u32
) -> Result<Id64>
Create a new Id64 with all the values specified explicitly.
Errors
Throws crate::error::Error
if it is impossible to create such an id due to the width of the values passed.
To avoid this, the values passed must be used according to the specification of the steam id 64.
Also may throw a error if the account_type
passed is invalid.
Example
let old_id = steamidfx::id::Id64(76561197983318796); let info = old_id.info().unwrap(); let new_id = steamidfx::id::Id64::new_full(info.universe, info.account_type, info.instance, info.authentication_server, info.account).unwrap(); assert_eq!(old_id, new_id);
Trait Implementations
impl<'de> Deserialize<'de> for Id64
[src]
impl<'de> Deserialize<'de> for Id64
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialOrd<Id64> for Id64
[src]
impl PartialOrd<Id64> for Id64
[src]impl StructuralEq for Id64
[src]
impl StructuralEq for Id64
[src]impl StructuralPartialEq for Id64
[src]
impl StructuralPartialEq for Id64
[src]Auto Trait Implementations
impl RefUnwindSafe for Id64
impl RefUnwindSafe for Id64
impl UnwindSafe for Id64
impl UnwindSafe for Id64
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]