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