rusty_beads/types/
label.rs

1//! Label type definition.
2
3use serde::{Deserialize, Serialize};
4
5/// A label (tag) associated with an issue.
6#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
7pub struct Label {
8    /// Associated issue ID.
9    pub issue_id: String,
10    /// Tag name.
11    pub label: String,
12}
13
14impl Label {
15    /// Create a new label.
16    pub fn new(issue_id: impl Into<String>, label: impl Into<String>) -> Self {
17        Self {
18            issue_id: issue_id.into(),
19            label: label.into(),
20        }
21    }
22}