twilight_model/channel/message/component/unfurled_media.rs
1use serde::{Deserialize, Serialize};
2
3/// Unfurled media item for use in components.
4#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize)]
5pub struct UnfurledMediaItem {
6 /// The media type of the content. This field is ignored and provided by the
7 /// API as part of the response.
8 #[serde(skip_serializing_if = "Option::is_none")]
9 pub content_type: Option<String>,
10 /// The height of the media item. This field is ignored and provided by the
11 /// API as part of the response.
12 #[serde(skip_serializing_if = "Option::is_none")]
13 pub height: Option<Option<u32>>,
14 /// The proxied url of the media item. This field is ignored and provided
15 /// by the API as part of the response.
16 #[serde(skip_serializing_if = "Option::is_none")]
17 pub proxy_url: Option<String>,
18 /// Supports arbitrary urls and `attachment://<filename>` references.
19 pub url: String,
20 /// The width of the media item. This field is ignored and provided by the
21 /// API as part of the response.
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub width: Option<Option<u32>>,
24}