asana/model/preview.rs
1use serde::{Serialize, Deserialize};
2/**A collection of rich text that will be displayed as a preview to another app.
3
4This is read-only except for a small group of whitelisted apps.*/
5#[derive(Debug, Clone, Serialize, Deserialize, Default)]
6pub struct Preview {
7 ///Some fallback text to display if unable to display the full preview.
8 pub fallback: String,
9 ///Text to display in the footer.
10 pub footer: String,
11 ///Text to display in the header.
12 pub header: String,
13 ///Where the header will link to.
14 pub header_link: String,
15 ///HTML formatted text for the body of the preview.
16 pub html_text: String,
17 ///Text for the body of the preview.
18 pub text: String,
19 ///Text to display as the title.
20 pub title: String,
21 ///Where to title will link to.
22 pub title_link: String,
23}
24impl std::fmt::Display for Preview {
25 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
26 write!(f, "{}", serde_json::to_string(self).unwrap())
27 }
28}