Skip to main content

asana/model/
goal_relationship_base.rs

1use serde::{Serialize, Deserialize};
2use super::GoalRelationshipCompact;
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct GoalRelationshipBase {
5    #[serde(flatten)]
6    pub goal_relationship_compact: GoalRelationshipCompact,
7    #[serde(skip_serializing_if = "Option::is_none")]
8    pub supported_goal: Option<serde_json::Value>,
9}
10impl std::fmt::Display for GoalRelationshipBase {
11    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12        write!(f, "{}", serde_json::to_string(self).unwrap())
13    }
14}
15impl std::ops::Deref for GoalRelationshipBase {
16    type Target = GoalRelationshipCompact;
17    fn deref(&self) -> &Self::Target {
18        &self.goal_relationship_compact
19    }
20}
21impl std::ops::DerefMut for GoalRelationshipBase {
22    fn deref_mut(&mut self) -> &mut Self::Target {
23        &mut self.goal_relationship_compact
24    }
25}