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