aboutsummaryrefslogtreecommitdiff
path: root/src/matchmaking.rs
diff options
context:
space:
mode:
authorFlaise <[email protected]>2019-08-02 20:30:48 -0500
committerMatthew Collins <[email protected]>2019-08-03 09:08:03 +0100
commitf109df710c3715b1bf863c5b3f1ac1f8a53b39ed (patch)
tree6927c655417ede7c48e168892bf3cae32512cc80 /src/matchmaking.rs
parentImplemented Serialize, Deserialize and other common traits where appropriate (diff)
downloadsteamworks-rs-f109df710c3715b1bf863c5b3f1ac1f8a53b39ed.tar.xz
steamworks-rs-f109df710c3715b1bf863c5b3f1ac1f8a53b39ed.zip
Made serde dependency optional
Diffstat (limited to 'src/matchmaking.rs')
-rw-r--r--src/matchmaking.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/matchmaking.rs b/src/matchmaking.rs
index 22486d1..8b9f2f7 100644
--- a/src/matchmaking.rs
+++ b/src/matchmaking.rs
@@ -11,7 +11,8 @@ pub struct Matchmaking<Manager> {
const CALLBACK_BASE_ID: i32 = 500;
/// The visibility of a lobby
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum LobbyType {
Private,
FriendsOnly,
@@ -19,7 +20,8 @@ pub enum LobbyType {
Invisible,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct LobbyId(pub(crate) u64);
impl LobbyId {