umya_spreadsheet/structs/drawing/
text_caps_values.rs

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