1use serde::Deserialize;
2use strum::{EnumIter, IntoStaticStr};
3
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, EnumIter, IntoStaticStr)]
5pub enum Epoch {
6 Medieval,
7 Renaissance,
8 Baroque,
9 Classical,
10 #[strum(serialize = "Early Romantic")]
11 #[serde(rename = "Early Romantic")]
12 EarlyRomantic,
13 Romantic,
14 #[strum(serialize = "Late Romantic")]
15 #[serde(rename = "Late Romantic")]
16 LateRomantic,
17 #[strum(serialize = "20th Century")]
18 #[serde(rename = "20th Century")]
19 TwentiethCentury,
20 #[strum(serialize = "Post-War")]
21 #[serde(rename = "Post-War")]
22 PostWar,
23 #[strum(serialize = "21st Century")]
24 #[serde(rename = "21st Century")]
25 TwentyFirstCentury,
26}
27
28impl Epoch {
29 pub(crate) fn into_url_str(self) -> &'static str {
30 let string: &'static str = self.into();
31 string
32 }
33}