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
//! [`CommodityCode`] — the product's customs tariff classification.
//!
//! **Where this comes from.** Commission Implementing Regulation (EU) 2026/1778
//! has the registry verify, "where relevant, the validity of the commodity code
//! of the product in relation to the permitted ranges for this product group"
//! (Art. 8(7)(d)), and store it as part of the registration data
//! (Art. 8(9)(b)). It is also what the registry's storage component holds for
//! products going under the customs procedure "release for free circulation"
//! (Art. 3(e)) — which is to say, it is the field customs authorities act on.
//!
//! # What is validated here, and what is not
//!
//! The code is a **structural** newtype: 6, 8 or 10 ASCII digits, matching the
//! three nested levels in use —
//!
//! - **6 digits** — Harmonised System subheading (WCO, global);
//! - **8 digits** — Combined Nomenclature, the EU's HS extension and the level
//! most product legislation cites;
//! - **10 digits** — TARIC, the CN plus Union measures.
//!
//! Whether a *particular* code is the right one for a product, or falls inside
//! the range a product group permits, is not checkable here: the permitted
//! ranges live in the applicable delegated act and the registry applies them on
//! submission. This type refuses what is definitely malformed and makes no claim
//! about what is merely wrong — the same division of labour as [`crate::Gtin`],
//! which checks the check digit and not whether the product exists.
use ;
use CommodityCodeError;
/// A validated customs tariff classification: HS-6, CN-8 or TARIC-10.
;