Struct steamidfx::id::Id64[][src]

pub struct Id64(pub u64);

Steam Id 64. Example: 7656119xxxxxxxxxx.

Implementations

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]

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]

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 Clone for Id64[src]

impl Copy for Id64[src]

impl Debug for Id64[src]

impl<'de> Deserialize<'de> for Id64[src]

impl Eq for Id64[src]

impl Hash for Id64[src]

impl Ord for Id64[src]

impl PartialEq<Id64> for Id64[src]

impl PartialOrd<Id64> for Id64[src]

impl Serialize for Id64[src]

impl StructuralEq for Id64[src]

impl StructuralPartialEq for Id64[src]

impl TryFrom<Id3> for Id64[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Id32> for Id64[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Id64> for Id32[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Id64

impl Send for Id64

impl Sync for Id64

impl Unpin for Id64

impl UnwindSafe for Id64

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.