aboutsummaryrefslogtreecommitdiff
path: root/src/user.rs
diff options
context:
space:
mode:
authorScetch <[email protected]>2018-03-10 14:27:22 -0500
committerMatthew Collins <[email protected]>2018-03-16 21:33:25 +0000
commite3f9fbbbd057713cad6921e45a95200a7e86ab02 (patch)
tree1b386cbb6cd3610980f3cb295cd307f182545d47 /src/user.rs
parentReplace Cow<str> with String in the API (diff)
downloadsteamworks-rs-e3f9fbbbd057713cad6921e45a95200a7e86ab02.tar.xz
steamworks-rs-e3f9fbbbd057713cad6921e45a95200a7e86ab02.zip
Cleanup callback handling.
Diffstat (limited to 'src/user.rs')
-rw-r--r--src/user.rs20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/user.rs b/src/user.rs
index 3babc18..ec2c768 100644
--- a/src/user.rs
+++ b/src/user.rs
@@ -152,13 +152,9 @@ pub struct AuthSessionTicketResponse {
}
unsafe impl Callback for AuthSessionTicketResponse {
- fn id() -> i32 {
- 163
- }
- fn size() -> i32 {
- ::std::mem::size_of::<sys::GetAuthSessionTicketResponse_t>() as i32
- }
-
+ const ID: i32 = 163;
+ const SIZE: i32 = ::std::mem::size_of::<sys::GetAuthSessionTicketResponse_t>() as i32;
+
unsafe fn from_raw(raw: *mut libc::c_void) -> Self {
let val = &mut *(raw as *mut sys::GetAuthSessionTicketResponse_t);
AuthSessionTicketResponse {
@@ -187,13 +183,9 @@ pub struct ValidateAuthTicketResponse {
unsafe impl Callback for ValidateAuthTicketResponse {
- fn id() -> i32 {
- 143
- }
- fn size() -> i32 {
- ::std::mem::size_of::<sys::ValidateAuthTicketResponse_t>() as i32
- }
-
+ const ID: i32 = 143;
+ const SIZE: i32 = ::std::mem::size_of::<sys::ValidateAuthTicketResponse_t>() as i32;
+
unsafe fn from_raw(raw: *mut libc::c_void) -> Self {
let val = &mut *(raw as *mut sys::ValidateAuthTicketResponse_t);
ValidateAuthTicketResponse {