Skip to main content

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