1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
mod date;
mod intbool;
mod error;
use std::string::{ToString, String};
pub use self::date::{Date, TimeZoneInfo};
pub use self::intbool::IntBool;
pub use self::error::Error;
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
pub struct Color(u8);
pub type Language = String;
pub type Priority = u8;
pub type ID = usize;
impl ToString for Color {
fn to_string(&self) -> String {
String::from(
match self.0 {
0 => "#95ef63",
1 => "#ff8581",
2 => "#ffc471",
3 => "#f9ec75",
4 => "#a8c8e4",
5 => "#d2b8a3",
6 => "#e2a8e4",
7 => "#cccccc",
8 => "#fb886e",
9 => "#ffcc00",
10 => "#74e8d3",
11 => "#3bd5fb",
12 => "#dc4fad",
13 => "#ac193d",
14 => "#d24726",
15 => "#82ba00",
16 => "#03b3b2",
17 => "#008299",
18 => "#5db2ff",
19 => "#0072c6",
20 => "#000000",
21 => "#777777",
_ => "INVALID",
}
)
}
}