umya-spreadsheet 2.3.3

umya-spreadsheet is a library written in pure Rust to read and write xlsx file.
Documentation
use super::EnumTrait;
use std::str::FromStr;
#[derive(Debug, Clone, Eq, Ord, PartialEq, PartialOrd)]
pub enum HorizontalAlignmentValues {
    Center,
    CenterContinuous,
    Distributed,
    Fill,
    General,
    Justify,
    Left,
    Right,
}
impl Default for HorizontalAlignmentValues {
    #[inline]
    fn default() -> Self {
        Self::General
    }
}
impl EnumTrait for HorizontalAlignmentValues {
    #[inline]
    fn get_value_string(&self) -> &str {
        match &self {
            Self::Center => "center",
            Self::CenterContinuous => "centerContinuous",
            Self::Distributed => "distributed",
            Self::Fill => "fill",
            Self::General => "general",
            Self::Justify => "justify",
            Self::Left => "left",
            Self::Right => "right",
        }
    }
}
impl FromStr for HorizontalAlignmentValues {
    type Err = ();

    #[inline]
    fn from_str(input: &str) -> Result<Self, Self::Err> {
        match input {
            "center" => Ok(Self::Center),
            "centerContinuous" => Ok(Self::CenterContinuous),
            "distributed" => Ok(Self::Distributed),
            "fill" => Ok(Self::Fill),
            "general" => Ok(Self::General),
            "justify" => Ok(Self::Justify),
            "left" => Ok(Self::Left),
            "right" => Ok(Self::Right),
            _ => Err(()),
        }
    }
}