asana/model/
user_task_list_compact.rs1use serde::{Serialize, Deserialize};
2use super::{AsanaResource, UserCompact, WorkspaceCompact};
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct UserTaskListCompact {
5 #[serde(flatten)]
7 pub asana_resource: AsanaResource,
8 #[serde(skip_serializing_if = "Option::is_none")]
10 pub name: Option<String>,
11 #[serde(skip_serializing_if = "Option::is_none")]
13 pub owner: Option<UserCompact>,
14 #[serde(skip_serializing_if = "Option::is_none")]
16 pub workspace: Option<WorkspaceCompact>,
17}
18impl std::fmt::Display for UserTaskListCompact {
19 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
20 write!(f, "{}", serde_json::to_string(self).unwrap())
21 }
22}
23impl std::ops::Deref for UserTaskListCompact {
24 type Target = AsanaResource;
25 fn deref(&self) -> &Self::Target {
26 &self.asana_resource
27 }
28}
29impl std::ops::DerefMut for UserTaskListCompact {
30 fn deref_mut(&mut self) -> &mut Self::Target {
31 &mut self.asana_resource
32 }
33}