umya_spreadsheet/structs/drawing/
text_wrapping_values.rs

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