diff options
| author | Flaise <[email protected]> | 2019-08-02 16:06:04 -0500 |
|---|---|---|
| committer | Matthew Collins <[email protected]> | 2019-08-03 09:08:03 +0100 |
| commit | f36084df856b0fc3933afe3a9f376c9ccc11a98c (patch) | |
| tree | 25994cdb5a83e7e120b7e10daf11dbc2f17a1888 /src/friends.rs | |
| parent | Fixed build script on Linux (diff) | |
| download | steamworks-rs-f36084df856b0fc3933afe3a9f376c9ccc11a98c.tar.xz steamworks-rs-f36084df856b0fc3933afe3a9f376c9ccc11a98c.zip | |
Implemented Serialize, Deserialize and other common traits where appropriate
Diffstat (limited to 'src/friends.rs')
| -rw-r--r-- | src/friends.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/friends.rs b/src/friends.rs index 905c7f0..770b542 100644 --- a/src/friends.rs +++ b/src/friends.rs @@ -5,6 +5,7 @@ use std::net::Ipv4Addr; const CALLBACK_BASE_ID: i32 = 300; bitflags! { + #[derive(Serialize, Deserialize)] #[repr(C)] pub struct FriendFlags: u16 { const NONE = 0x0000; @@ -26,6 +27,7 @@ bitflags! { } bitflags! { + #[derive(Serialize, Deserialize)] #[repr(C)] pub struct PersonaChange: i32 { const NAME = 0x0001; @@ -113,7 +115,7 @@ impl <Manager> Friends<Manager> { } /// Information about a friend's current state in a game -#[derive(Debug)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct FriendGame { /// The id of the game that the friend is /// playing @@ -128,7 +130,7 @@ pub struct FriendGame { pub lobby: LobbyId, } -#[derive(Debug)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct PersonaStateChange { pub steam_id: SteamId, pub flags: PersonaChange, @@ -147,7 +149,7 @@ unsafe impl Callback for PersonaStateChange { } } -#[derive(Debug)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct GameLobbyJoinRequested { pub lobby_steam_id: LobbyId, pub friend_steam_id: SteamId, @@ -281,4 +283,4 @@ pub enum FriendState { Snooze, LookingToTrade, LookingToPlay, -}
\ No newline at end of file +} |