zugferd_code_lists/zugferd_2_3_3/
fiscalid.rs

1#![allow(non_camel_case_types)]
2
3#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
4pub enum FiscalID {
5    /// Fiscal number
6    FiscalNumber,
7}
8
9impl crate::Code for FiscalID {
10    fn code(self) -> &'static str {
11        match self {
12            FiscalID::FiscalNumber => "FC",
13        }
14    }
15}
16
17impl crate::Description for FiscalID {
18    fn description(self) -> &'static str {
19        match self {
20            FiscalID::FiscalNumber => "Fiscal number",
21        }
22    }
23}
24
25impl crate::FromCode for FiscalID {
26    fn from_code(code: &str) -> Option<Self>
27    where
28        Self: Sized,
29    {
30        match code {
31            "FC" => Some(FiscalID::FiscalNumber),
32            _ => None,
33        }
34    }
35}