aboutsummaryrefslogtreecommitdiff
path: root/src/user.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/user.rs')
-rw-r--r--src/user.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/user.rs b/src/user.rs
new file mode 100644
index 0000000..fcd3e40
--- /dev/null
+++ b/src/user.rs
@@ -0,0 +1,17 @@
+
+use super::*;
+
+/// Access to the steam user interface
+pub struct User {
+ pub(crate) user: *mut sys::ISteamUser,
+ pub(crate) _client: Arc<ClientInner>,
+}
+
+impl User {
+ /// Returns the steam id of the current user
+ pub fn steam_id(&self) -> SteamId {
+ unsafe {
+ SteamId(sys::SteamAPI_ISteamUser_GetSteamID(self.user))
+ }
+ }
+} \ No newline at end of file