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 /// Supports arbitrary urls and `attachment://<filename>` references.
7 pub url: String,
8 /// The proxied url of the media item. This field is ignored and provided
9 /// by the API as part of the response.
10 #[serde(skip_serializing_if = "Option::is_none")]
11 pub proxy_url: Option<String>,
12 /// The height of the media item. This field is ignored and provided by the
13 /// API as part of the response.
14 #[serde(skip_serializing_if = "Option::is_none")]
15 pub height: Option<Option<u32>>,
16 /// The width of the media item. This field is ignored and provided by the
17 /// API as part of the response.
18 #[serde(skip_serializing_if = "Option::is_none")]
19 pub width: Option<Option<u32>>,
20 /// The media type of the content. This field is ignored and provided by the
21 /// API as part of the response.
22 pub content_type: Option<String>,
23}