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