use serde::{Deserialize, Serialize}; #[serde(deny_unknown_fields)] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] pub(super) struct Attachment { id: String, r#type: AttachmentType, url: String, preview_url: String, remote_url: Option, text_url: Option, meta: Option, description: Option, blurhash: Option, } #[serde(rename_all = "lowercase", deny_unknown_fields)] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] enum AttachmentType { Unknown, Image, Gifv, Video, Audio, }