1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::events::Color;

#[derive(Clone)]
pub struct Tag {
    pub(crate) title: String,
    pub(crate) color: Option<Color>,
}

impl Tag {
    pub fn title(&self) -> String {
        self.title.clone()
    }

    pub fn hash_tag(&self) -> String {
        self.title.to_lowercase()
    }

    pub fn color(&self) -> Option<u32> {
        self.color
    }
}