aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/group.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-01-01 15:55:46 -0800
committerZeyla Hellyer <[email protected]>2018-01-01 15:55:46 -0800
commit25dddb6695109eeead9e19593cb85a22096c2c7a (patch)
treed68d78d210a2804d10027035163871bf806c7e23 /src/model/channel/group.rs
parentGive hyper Response in HTTP errors (diff)
downloadserenity-25dddb6695109eeead9e19593cb85a22096c2c7a.tar.xz
serenity-25dddb6695109eeead9e19593cb85a22096c2c7a.zip
Implement or derive Serialize on all models
Diffstat (limited to 'src/model/channel/group.rs')
-rw-r--r--src/model/channel/group.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/model/channel/group.rs b/src/model/channel/group.rs
index bff58aa..4a4070a 100644
--- a/src/model/channel/group.rs
+++ b/src/model/channel/group.rs
@@ -17,7 +17,7 @@ use std::fmt::Write as FmtWrite;
///
/// [`Guild`]: struct.Guild.html
/// [`User`]: struct.User.html
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Group {
/// The Id of the group channel.
#[serde(rename = "id")]
@@ -33,7 +33,8 @@ pub struct Group {
/// The Id of the group owner.
pub owner_id: UserId,
/// A map of the group's recipients.
- #[serde(deserialize_with = "deserialize_users")]
+ #[serde(deserialize_with = "deserialize_users",
+ serialize_with = "serialize_users")]
pub recipients: HashMap<UserId, Arc<RwLock<User>>>,
}