Skip to main content

asana/model/
team_compact.rs

1use serde::{Serialize, Deserialize};
2use super::AsanaResource;
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct TeamCompact {
5    ///A generic Asana Resource, containing a globally unique identifier.
6    #[serde(flatten)]
7    pub asana_resource: AsanaResource,
8    ///The name of the team.
9    #[serde(skip_serializing_if = "Option::is_none")]
10    pub name: Option<String>,
11}
12impl std::fmt::Display for TeamCompact {
13    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14        write!(f, "{}", serde_json::to_string(self).unwrap())
15    }
16}
17impl std::ops::Deref for TeamCompact {
18    type Target = AsanaResource;
19    fn deref(&self) -> &Self::Target {
20        &self.asana_resource
21    }
22}
23impl std::ops::DerefMut for TeamCompact {
24    fn deref_mut(&mut self) -> &mut Self::Target {
25        &mut self.asana_resource
26    }
27}