mastodon-async/src/entities/card.rs

31 lines
793 B
Rust
Raw Normal View History

2022-11-27 14:44:43 +00:00
//! Module representing cards of statuses.
2022-12-07 20:58:28 +00:00
use serde::{Deserialize, Serialize};
2022-11-27 14:44:43 +00:00
/// A card of a status.
2022-12-07 20:58:28 +00:00
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
2022-11-27 14:44:43 +00:00
pub struct Card {
/// The url associated with the card.
pub url: String,
/// The title of the card.
pub title: String,
/// The card description.
pub description: String,
/// The image associated with the card, if any.
pub image: Option<String>,
/// OEmbed data
author_name: Option<String>,
/// OEmbed data
author_url: Option<String>,
/// OEmbed data
provider_name: Option<String>,
/// OEmbed data
provider_url: Option<String>,
/// OEmbed data
html: Option<String>,
/// OEmbed data
width: Option<u64>,
/// OEmbed data
height: Option<u64>,
}