Skip to main content

asana/model/
status_update_base.rs

1use serde::{Serialize, Deserialize};
2use super::StatusUpdateCompact;
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct StatusUpdateBase {
5    #[serde(flatten)]
6    pub status_update_compact: StatusUpdateCompact,
7    ///[Opt In](/docs/inputoutput-options). The text content of the status update with formatting as HTML.
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub html_text: Option<String>,
10    ///The type associated with the status update. This represents the current state of the object this object is on.
11    pub status_type: String,
12    ///The text content of the status update.
13    pub text: String,
14}
15impl std::fmt::Display for StatusUpdateBase {
16    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17        write!(f, "{}", serde_json::to_string(self).unwrap())
18    }
19}
20impl std::ops::Deref for StatusUpdateBase {
21    type Target = StatusUpdateCompact;
22    fn deref(&self) -> &Self::Target {
23        &self.status_update_compact
24    }
25}
26impl std::ops::DerefMut for StatusUpdateBase {
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.status_update_compact
29    }
30}