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
61
62
63
64
65
66
use super::EnumTrait;
use std::str::FromStr;
#[derive(Debug, Clone, Eq, Ord, PartialEq, PartialOrd)]
pub enum BorderStyleValues {
    DashDot,
    DashDotDot,
    Dashed,
    Dotted,
    Double,
    Hair,
    Medium,
    MediumDashDot,
    MediumDashDotDot,
    MediumDashed,
    None,
    SlantDashDot,
    Thick,
    Thin,
}
impl Default for BorderStyleValues {
    fn default() -> Self {
        Self::None
    }
}
impl EnumTrait for BorderStyleValues {
    fn get_value_string(&self) -> &str {
        match &self {
            Self::DashDot => "dashDot",
            Self::DashDotDot => "dashDotDot",
            Self::Dashed => "dashed",
            Self::Dotted => "dotted",
            Self::Double => "double",
            Self::Hair => "hair",
            Self::Medium => "medium",
            Self::MediumDashDot => "mediumDashDot",
            Self::MediumDashDotDot => "mediumDashDotDot",
            Self::MediumDashed => "mediumDashed",
            Self::None => "none",
            Self::SlantDashDot => "slantDashDot",
            Self::Thick => "thick",
            Self::Thin => "thin",
        }
    }
}
impl FromStr for BorderStyleValues {
    type Err = ();
    fn from_str(input: &str) -> Result<Self, Self::Err> {
        match input {
            "dashDot" => Ok(Self::DashDot),
            "dashDotDot" => Ok(Self::DashDotDot),
            "dashed" => Ok(Self::Dashed),
            "dotted" => Ok(Self::Dotted),
            "double" => Ok(Self::Double),
            "hair" => Ok(Self::Hair),
            "medium" => Ok(Self::Medium),
            "mediumDashDot" => Ok(Self::MediumDashDot),
            "mediumDashDotDot" => Ok(Self::MediumDashDotDot),
            "mediumDashed" => Ok(Self::MediumDashed),
            "none" => Ok(Self::None),
            "slantDashDot" => Ok(Self::SlantDashDot),
            "thick" => Ok(Self::Thick),
            "thin" => Ok(Self::Thin),
            _ => Err(()),
        }
    }
}