aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/embed.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/embed.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/embed.rs')
-rw-r--r--src/model/channel/embed.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/model/channel/embed.rs b/src/model/channel/embed.rs
index 5359ed5..8837a8d 100644
--- a/src/model/channel/embed.rs
+++ b/src/model/channel/embed.rs
@@ -17,7 +17,7 @@ use utils;
/// 1024 in a field value, and 2048 in a description.
///
/// [slack's attachments]: https://api.slack.com/docs/message-attachments
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Embed {
/// Information about the author of the embed.
pub author: Option<EmbedAuthor>,
@@ -95,7 +95,7 @@ impl Embed {
}
/// An author object in an embed.
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EmbedAuthor {
/// The URL of the author icon.
///
@@ -110,7 +110,7 @@ pub struct EmbedAuthor {
}
/// A field object in an embed.
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EmbedField {
/// Indicator of whether the field should display as inline.
pub inline: bool,
@@ -143,7 +143,7 @@ impl EmbedField {
}
/// Footer information for an embed.
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EmbedFooter {
/// The URL of the footer icon.
///
@@ -156,7 +156,7 @@ pub struct EmbedFooter {
}
/// An image object in an embed.
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EmbedImage {
/// The height of the image.
pub height: u64,
@@ -171,7 +171,7 @@ pub struct EmbedImage {
}
/// The provider of an embed.
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EmbedProvider {
/// The name of the provider.
pub name: String,
@@ -180,7 +180,7 @@ pub struct EmbedProvider {
}
/// The dimensions and URL of an embed thumbnail.
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EmbedThumbnail {
/// The height of the thumbnail in pixels.
pub height: u64,
@@ -195,7 +195,7 @@ pub struct EmbedThumbnail {
}
/// Video information for an embed.
-#[derive(Clone, Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EmbedVideo {
/// The height of the video in pixels.
pub height: u64,