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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
//! Who owes a battery passport at all — Regulation (EU) 2023/1542 **Art. 77(1)**.
//!
//! Read from the consolidated text `02023R1542 -- EN -- 31.07.2025 -- 002.004`,
//! **p. 82**, verbatim:
//!
//! > "From 18 February 2027 each LMT battery, each industrial battery with a
//! > capacity greater than 2 kWh and each electric vehicle battery placed on the
//! > market or put into service shall have an electronic record ('battery
//! > passport')."
//!
//! ## Three of five categories, and the one qualifier
//!
//! The Regulation defines five battery categories. Art. 77(1) reaches **three**:
//! LMT, electric-vehicle, and industrial **above 2 kWh**. Portable and SLI
//! batteries are named nowhere in it and owe no passport.
//!
//! 🚨 **It says "each industrial battery", not "each *rechargeable* industrial
//! battery".** Art. 7(2) and Art. 10(5) both add "rechargeable" when they mean
//! it; Art. 77(1) does not. So the passport scope is every industrial battery
//! over the threshold, and narrowing it to rechargeable ones would exempt
//! batteries the article covers.
//!
//! ## Why this is not [`passport_content`](super::passport_content)
//!
//! That module answers *what a battery of this category must carry*. It returns
//! [`Requirement::Unknown`](super::passport_content::Requirement::Unknown) for
//! portable and SLI, because the Commission's data-point guidance does not cover
//! them — which is the honest answer to the question it is asked.
//!
//! But a content gate reading `Unknown` demands nothing, so a portable battery
//! passes it while claiming to discharge an obligation that does not exist. The
//! two questions have to be asked separately: *is a passport owed?* comes first,
//! and only then *what must it contain?*
use crateCalendarDate;
/// Capacity above which an industrial battery owes a passport, in kWh.
///
/// Art. 77(1), "a capacity **greater than** 2 kWh" — strictly greater, so a
/// battery at exactly 2 kWh owes nothing.
///
/// The same figure scopes Art. 8 recycled content and Art. 7(2) carbon-footprint
/// labelling, and it is deliberately restated here rather than shared: three
/// articles that happen to agree today are three articles that can be amended
/// separately, and a single constant would hide the day one of them moves.
pub const INDUSTRIAL_PASSPORT_THRESHOLD_KWH: f64 = 2.0;
/// First day the Art. 77(1) passport obligation applies — 18 February 2027.
pub const PASSPORT_REQUIRED_FROM: CalendarDate = new;
/// Whether a battery owes a passport under Art. 77(1), and if not, why not.
///
/// Five outcomes, deliberately not a `bool`. "This category never owes one",
/// "this one is under the threshold", "we cannot tell" and "not yet" are four
/// different sentences to put in front of an operator, and collapsing any of
/// them into `false` reports an exemption the Regulation does not grant — or
/// hides one it does. The same reasoning shapes
/// [`Art8Phase`](super::recycled_content::Art8Phase).
/// Whether `battery_type` owes a battery passport under Art. 77(1).
///
/// `battery_type` is the **wire** name — `"ev"`, `"lmt"`, `"industrial"`,
/// `"portable"`, `"starting-lighting-ignition"` — because this crate is `no_std`
/// and zero-dependency and is read by the Wasm product group plugins, which see
/// JSON and never the Rust enum. Matching is case-insensitive and trims
/// surrounding whitespace, as in [`super::passport_content`].
///
/// `capacity_kwh` is consulted **only** for industrial batteries; it is ignored
/// for every other category, because Art. 77(1) attaches the threshold to that
/// word alone. `None` for an industrial battery yields
/// [`PassportScope::CapacityUnknown`].
///
/// An unrecognised `battery_type` answers [`PassportScope::NotCovered`] — Art.
/// 77(1) is a closed list of three, so anything that is not one of them is
/// outside it. That is a statement about the article, not a guess about the
/// input.