#[derive(Debug, Clone, PartialEq)]
pub enum CalculatorStatus {
Active {
ruleset_id: &'static str,
},
PendingDelegatedAct {
expected_year: Option<u16>,
},
ReportingOnly,
}
pub struct SectorCalculatorEntry {
pub sector_key: &'static str,
pub product_category: &'static str,
pub methodology: &'static str,
pub status: CalculatorStatus,
}
pub fn sector_calculator_map() -> &'static [SectorCalculatorEntry] {
&[
SectorCalculatorEntry {
sector_key: "electronics",
product_category: "smartphone-tablet",
methodology: "repairability-heuristic",
status: CalculatorStatus::Active {
ruleset_id: "repairability-heuristic-v1",
},
},
SectorCalculatorEntry {
sector_key: "electronics",
product_category: "laptop",
methodology: "repairability-heuristic",
status: CalculatorStatus::PendingDelegatedAct {
expected_year: Some(2027),
},
},
SectorCalculatorEntry {
sector_key: "electronics",
product_category: "displays",
methodology: "repairability-heuristic",
status: CalculatorStatus::PendingDelegatedAct {
expected_year: None,
},
},
SectorCalculatorEntry {
sector_key: "battery",
product_category: "all",
methodology: "co2e-pef",
status: CalculatorStatus::Active {
ruleset_id: "co2e-cradle-to-gate",
},
},
SectorCalculatorEntry {
sector_key: "battery",
product_category: "all",
methodology: "co2e-battery-regulation-art7",
status: CalculatorStatus::PendingDelegatedAct {
expected_year: None,
},
},
SectorCalculatorEntry {
sector_key: "unsoldGoods",
product_category: "all",
methodology: "unsold-goods-reporting",
status: CalculatorStatus::ReportingOnly,
},
SectorCalculatorEntry {
sector_key: "electronics",
product_category: "washing-machine",
methodology: "repairability-heuristic",
status: CalculatorStatus::PendingDelegatedAct {
expected_year: Some(2026),
},
},
]
}