diff options
| author | Alex Parrill <[email protected]> | 2019-06-05 22:28:05 -0400 |
|---|---|---|
| committer | Matthew Collins <[email protected]> | 2019-06-09 23:50:11 +0100 |
| commit | 1db54ed7e950f227fb323d0a9a8783477603811b (patch) | |
| tree | 13de67354cab9784f9b188d75ad49a5e20048181 /src | |
| parent | Add Utils::set_warning_callback for logging Steam warnings (diff) | |
| download | steamworks-rs-1db54ed7e950f227fb323d0a9a8783477603811b.tar.xz steamworks-rs-1db54ed7e950f227fb323d0a9a8783477603811b.zip | |
Add SteamId::account_id to get the account ID
The account ID is used in a few places in the API.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -345,6 +345,13 @@ impl SteamId { sys::steam_rust_is_steam_id_valid(self.0) != 0 } } + + /// Returns the account id for this steam id + pub fn account_id(&self) -> u32 { + unsafe { + sys::steam_rust_get_account_id_from_steam_id(self.0).0 + } + } } /// A game id |