umya_spreadsheet/structs/drawing/
bevel_preset_values.rs1use super::super::super::EnumTrait;
2use std::str::FromStr;
3#[derive(Clone, Debug)]
4pub enum BevelPresetValues {
5 Angle,
6 ArtDeco,
7 Circle,
8 Convex,
9 CoolSlant,
10 Cross,
11 Divot,
12 HardEdge,
13 RelaxedInset,
14 Riblet,
15 Slope,
16 SoftRound,
17}
18impl Default for BevelPresetValues {
19 #[inline]
20 fn default() -> Self {
21 Self::RelaxedInset
22 }
23}
24impl EnumTrait for BevelPresetValues {
25 #[inline]
26 fn get_value_string(&self) -> &str {
27 match &self {
28 Self::Angle => "angle",
29 Self::ArtDeco => "artDeco",
30 Self::Circle => "circle",
31 Self::Convex => "convex",
32 Self::CoolSlant => "coolSlant",
33 Self::Cross => "cross",
34 Self::Divot => "divot",
35 Self::HardEdge => "hardEdge",
36 Self::RelaxedInset => "relaxedInset",
37 Self::Riblet => "riblet",
38 Self::Slope => "slope",
39 Self::SoftRound => "softRound",
40 }
41 }
42}
43impl FromStr for BevelPresetValues {
44 type Err = ();
45
46 #[inline]
47 fn from_str(input: &str) -> Result<Self, Self::Err> {
48 match input {
49 "angle" => Ok(Self::Angle),
50 "artDeco" => Ok(Self::ArtDeco),
51 "circle" => Ok(Self::Circle),
52 "convex" => Ok(Self::Convex),
53 "coolSlant" => Ok(Self::CoolSlant),
54 "cross" => Ok(Self::Cross),
55 "divot" => Ok(Self::Divot),
56 "hardEdge" => Ok(Self::HardEdge),
57 "relaxedInset" => Ok(Self::RelaxedInset),
58 "riblet" => Ok(Self::Riblet),
59 "slope" => Ok(Self::Slope),
60 "softRound" => Ok(Self::SoftRound),
61 _ => Err(()),
62 }
63 }
64}