umya-spreadsheet 2.3.3

umya-spreadsheet is a library written in pure Rust to read and write xlsx file.
Documentation
use super::super::super::EnumTrait;
use std::str::FromStr;
#[derive(Clone, Debug)]
pub enum ShapeValues {
    Box,
    Cone,
    ConeToMax,
    Cylinder,
    Pyramid,
    PyramidToMaximum,
}
impl Default for ShapeValues {
    fn default() -> Self {
        Self::Cone
    }
}
impl EnumTrait for ShapeValues {
    fn get_value_string(&self) -> &str {
        match &self {
            Self::Box => "box",
            Self::Cone => "cone",
            Self::ConeToMax => "coneToMax",
            Self::Cylinder => "cylinder",
            Self::Pyramid => "pyramid",
            Self::PyramidToMaximum => "pyramidToMax",
        }
    }
}
impl FromStr for ShapeValues {
    type Err = ();
    fn from_str(input: &str) -> Result<Self, Self::Err> {
        match input {
            "box" => Ok(Self::Box),
            "cone" => Ok(Self::Cone),
            "coneToMax" => Ok(Self::ConeToMax),
            "cylinder" => Ok(Self::Cylinder),
            "pyramid" => Ok(Self::Pyramid),
            "pyramidToMax" => Ok(Self::PyramidToMaximum),
            _ => Err(()),
        }
    }
}