umya_spreadsheet/structs/drawing/
text_caps_values.rs1use std::str::FromStr;
2
3use super::super::super::EnumTrait;
4#[derive(Clone, Debug)]
5pub enum TextCapsValues {
6 All,
7 None,
8 Small,
9}
10impl Default for TextCapsValues {
11 #[inline]
12 fn default() -> Self {
13 Self::None
14 }
15}
16impl EnumTrait for TextCapsValues {
17 #[inline]
18 fn value_string(&self) -> &str {
19 match &self {
20 Self::All => "all",
21 Self::None => "none",
22 Self::Small => "small",
23 }
24 }
25}
26impl FromStr for TextCapsValues {
27 type Err = ();
28
29 #[inline]
30 fn from_str(input: &str) -> Result<Self, Self::Err> {
31 match input {
32 "all" => Ok(Self::All),
33 "none" => Ok(Self::None),
34 "small" => Ok(Self::Small),
35 _ => Err(()),
36 }
37 }
38}