Skip to main content

cimstructs/
FuelType.rs

1/// Type of fuel.
2#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3pub enum FuelType {
4    /// Generic coal, not including lignite type.
5    coal,
6    /// Oil.
7    oil,
8    /// Natural gas.
9    gas,
10    /// The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known.
11    lignite,
12    /// Hard coal.
13    hardCoal,
14    /// Oil Shale.
15    oilShale,
16    /// Brown coal lignite.
17    brownCoalLignite,
18    /// Coal derived gas.
19    coalDerivedGas,
20    /// Peat.
21    peat,
22    /// Any fuel type not included in the rest of the enumerated value.
23    other,
24}
25
26impl FuelType {
27    pub fn uri(&self) -> &'static str {
28        match self {
29            FuelType::coal => "http://iec.ch/TC57/CIM100#FuelType.coal",
30            FuelType::oil => "http://iec.ch/TC57/CIM100#FuelType.oil",
31            FuelType::gas => "http://iec.ch/TC57/CIM100#FuelType.gas",
32            FuelType::lignite => "http://iec.ch/TC57/CIM100#FuelType.lignite",
33            FuelType::hardCoal => "http://iec.ch/TC57/CIM100#FuelType.hardCoal",
34            FuelType::oilShale => "http://iec.ch/TC57/CIM100#FuelType.oilShale",
35            FuelType::brownCoalLignite => "http://iec.ch/TC57/CIM100#FuelType.brownCoalLignite",
36            FuelType::coalDerivedGas => "http://iec.ch/TC57/CIM100#FuelType.coalDerivedGas",
37            FuelType::peat => "http://iec.ch/TC57/CIM100#FuelType.peat",
38            FuelType::other => "http://iec.ch/TC57/CIM100#FuelType.other",
39        }
40    }
41}