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 PenAlignmentValues {
    Center,
    Insert,
}
impl Default for PenAlignmentValues {
    #[inline]
    fn default() -> Self {
        Self::Center
    }
}
impl EnumTrait for PenAlignmentValues {
    #[inline]
    fn get_value_string(&self) -> &str {
        match &self {
            Self::Center => "ctr",
            Self::Insert => "in",
        }
    }
}
impl FromStr for PenAlignmentValues {
    type Err = ();

    #[inline]
    fn from_str(input: &str) -> Result<Self, Self::Err> {
        match input {
            "ctr" => Ok(Self::Center),
            "in" => Ok(Self::Insert),
            _ => Err(()),
        }
    }
}