use serde::{Deserialize, Serialize}; use crate::{settings::Setting, user::User, value::GiteratedObjectValue}; use super::{Issue, IssueStatus, IssueTag}; #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)] #[repr(transparent)] #[serde(transparent)] pub struct Tags(pub Vec); impl GiteratedObjectValue for Tags { type Object = Issue; fn value_name() -> &'static str { "tags" } } impl Setting for Tags { fn name() -> &'static str { "tags" } } #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)] #[repr(transparent)] #[serde(transparent)] pub struct Status(pub IssueStatus); impl GiteratedObjectValue for Status { type Object = Issue; fn value_name() -> &'static str { "status" } } impl Setting for Status { fn name() -> &'static str { "status" } } #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)] #[repr(transparent)] #[serde(transparent)] pub struct Title(pub String); impl GiteratedObjectValue for Title { type Object = Issue; fn value_name() -> &'static str { "title" } } impl Setting for Title { fn name() -> &'static str { "title" } } #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)] #[repr(transparent)] #[serde(transparent)] pub struct Assignees(pub Vec); impl GiteratedObjectValue for Assignees { type Object = Issue; fn value_name() -> &'static str { "assignees" } } impl Setting for Assignees { fn name() -> &'static str { "assignees" } }