1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
mod author; mod field; mod footer; mod image; mod provider; mod thumbnail; mod video; pub use self::{ author::EmbedAuthor, field::EmbedField, footer::EmbedFooter, image::EmbedImage, provider::EmbedProvider, thumbnail::EmbedThumbnail, video::EmbedVideo, }; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] pub struct Embed { pub author: Option<EmbedAuthor>, #[serde(default)] pub color: Option<u32>, pub description: Option<String>, #[serde(default)] pub fields: Vec<EmbedField>, pub footer: Option<EmbedFooter>, pub image: Option<EmbedImage>, #[serde(rename = "type")] pub kind: String, pub provider: Option<EmbedProvider>, pub thumbnail: Option<EmbedThumbnail>, pub timestamp: Option<String>, pub title: Option<String>, pub url: Option<String>, pub video: Option<EmbedVideo>, }