1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Simplified repairability heuristic — six-parameter, 0–2 each, A–E band.
//!
//! ⚠️ **Non-regulatory.** This is a transparent six-factor indicator
//! (disassembly, spare parts, repair info, diagnostic tools, software updates,
//! customer support), each scored 0–2. It is **not** the enacted EU 2023/1669
//! (smartphones/tablets) Annex IV repairability index, which uses a different
//! parameter set (incl. Fasteners & Tools), a 1–5 per-class scale, a
//! priority-part dimension, and its own class boundaries. The A–E result is a
//! heuristic band and must not be presented as a regulatory repairability class.
//! A faithful EU 2023/1669 Annex IV implementation is tracked separately.
//!
//! **Usage:**
//! ```rust
//! use chrono::NaiveDate;
//! use dpp_calc::clock::AssessmentClock;
//! use dpp_calc::repairability::{
//! calculate, parameters::RepairabilityInputs,
//! thresholds::SimplifiedRepairabilityHeuristic,
//! };
//!
//! let inputs = RepairabilityInputs {
//! disassembly: 2,
//! spare_parts: 2,
//! repair_info: 2,
//! diagnostic_tools: 1,
//! software_updatability: 2,
//! customer_support: 1,
//! };
//! // The date the governing law attached to the product — from the product's
//! // own record, never from the wall clock.
//! let clock = AssessmentClock::placed_on(NaiveDate::from_ymd_opt(2026, 1, 1).unwrap());
//!
//! let result = calculate(&inputs, &SimplifiedRepairabilityHeuristic, clock).unwrap();
//! println!("{:?} ({:.2}/10)", result.class, result.numeric_score);
//! ```
//!
//! ## Module layout
//!
//! - [`calculator`] — [`calculate`], [`RepairabilityResult`], [`RepairabilityClass`].
//! - [`parameters`] — [`RepairabilityInputs`].
//! - [`thresholds`] — the [`thresholds::RepairabilityRuleset`] trait + concrete rulesets.
//! - `golden_vectors` — worked-example regression tests.
pub use ;
pub use RepairabilityInputs;
pub use ;