Skip to main content

dpp_domain/domain/sector/data/
electronics.rs

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