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
//! [`CarrierQualifier`] — what a passport's data carrier prints after its GTIN.
use Cow;
/// What a passport's GS1 data carrier prints after its GTIN, and so the level
/// the carrier claims to identify.
///
/// # Why the level decides it
///
/// A GS1 Digital Link keyed on a GTIN names a different thing depending on the
/// qualifier that follows. The GTIN alone names the trade item — the model. With
/// AI 10 it names one batch or lot of it. With AI 21 it is a serialised GTIN,
/// which GS1 defines as identifying **one individual** item: two otherwise
/// identical units carry distinct serialised GTINs. A carrier printed on every
/// unit a model-level passport covers therefore must not carry AI 21, or every
/// one of those units presents the same "individual" identity.
///
/// Art. 10(1)(f) of Regulation (EU) 2024/1781 draws the same three-way line —
/// the data *"shall refer to the product model, batch or item"* — and
/// [`Granularity`](crate::Granularity) records which of the three a passport is.
/// [`Passport::carrier_qualifier`](crate::Passport::carrier_qualifier) maps one
/// onto the other.
///
/// # One value, read twice
///
/// The carrier is built from this, and a printed label is resolved by comparing
/// against it, so the two cannot drift: a carrier that asserts one level and a
/// lookup that infers another is how a label came to resolve to nothing before.