diff options
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 +} |