dpp_domain/domain/sector/data/electronics.rs
1//! Electronics — EU Reg. 2023/1670 (ecodesign) + 2023/1669 (energy labelling).
2//!
3//! Applicability dates and regulatory status live in the sector manifest
4//! (`sectors/electronics.json`); see `docs/regulatory/REGULATORY.md` for what is
5//! implemented versus pending.
6
7use chrono::{DateTime, Utc};
8use serde::{Deserialize, Serialize};
9
10use crate::domain::gtin::Gtin;
11use crate::domain::sector::enums::EnergyEfficiencyClass;
12use crate::domain::sector::metrics::RepairabilityScore;
13
14use super::shared::{CriticalRawMaterial, SvhcSubstance};
15
16/// Electronics sector data.
17///
18/// Scope and applicability dates are held in the sector manifest
19/// (`sectors/electronics.json`), not restated here.
20#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
21#[serde(rename_all = "camelCase")]
22pub struct ElectronicsData {
23 /// 14-digit GTIN identifying the product model.
24 pub gtin: Gtin,
25 /// Product category, e.g. `"smartphone"`, `"laptop"`, `"tablet"`, `"monitor"`,
26 /// `"tv"`, `"server"`, `"charger"`, `"earphone"`, `"other"`.
27 pub product_category: String,
28 /// EU energy label class (A–G) per Energy Labelling Regulation 2017/1369.
29 pub energy_efficiency_class: EnergyEfficiencyClass,
30 /// Whole-lifecycle carbon footprint in kg CO₂e per unit.
31 pub co2e_per_unit_kg: f64,
32
33 /// Repairability score (non-regulatory heuristic — not EN 45554 / EU 2023/1669).
34 /// `overall` ≥ 6.0 = good; < 4.0 = fails minimum standard.
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub repairability_score: Option<RepairabilityScore>,
37 /// Whether spare parts are commercially available from the manufacturer.
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub spare_parts_available: Option<bool>,
40 /// URL to the repair manual or repair information portal.
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub repair_manual_url: Option<String>,
43 /// URL to disassembly / dismantling instructions.
44 #[serde(skip_serializing_if = "Option::is_none")]
45 pub disassembly_instructions_url: Option<String>,
46 /// SVHC substances present above 0.1% w/w (REACH Art. 33).
47 #[serde(skip_serializing_if = "Option::is_none")]
48 pub svhc_substances: Option<Vec<SvhcSubstance>>,
49 /// Whether the product complies with RoHS Directive 2011/65/EU.
50 #[serde(skip_serializing_if = "Option::is_none")]
51 pub rohs_compliant: Option<bool>,
52 /// Critical raw materials present (EU CRM Act 2024/1252).
53 #[serde(skip_serializing_if = "Option::is_none")]
54 pub critical_raw_materials: Option<Vec<CriticalRawMaterial>>,
55 /// Recycled content as a percentage of total product weight (0.0–100.0).
56 #[serde(skip_serializing_if = "Option::is_none")]
57 pub recycled_content_pct: Option<f64>,
58 /// Standby power consumption in watts.
59 #[serde(skip_serializing_if = "Option::is_none")]
60 pub standby_power_w: Option<f64>,
61 /// Expected product lifetime in years under normal use.
62 #[serde(skip_serializing_if = "Option::is_none")]
63 pub expected_lifetime_years: Option<u32>,
64 /// Date until which firmware / software updates are guaranteed.
65 #[serde(skip_serializing_if = "Option::is_none")]
66 pub firmware_update_until: Option<DateTime<Utc>>,
67}