umya_spreadsheet/structs/drawing/charts/
layout_target_values.rs

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