use serde::{Deserialize, Serialize}; #[serde(deny_unknown_fields)] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] pub(super) struct Card { url: String, title: String, description: String, r#type: CardType, author_name: Option, author_url: Option, provider_name: Option, provider_url: Option, html: Option, width: Option, height: Option, image: Option, embed_url: Option, } #[serde(rename_all = "lowercase", deny_unknown_fields)] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] enum CardType { Link, Photo, Video, Rich, }