Skip to main content

Module identifier

Module identifier 

Source
Expand description

EN 18219:2026 clause 5 identifier syntax, for the two tiers that check it, and the GS1 AI 10 batch and AI 21 serial a passport’s data carrier prints.

🚨 One home on purpose. These predicates lived only in dpp_domain::identifier::ProductIdentifier, and the plugin SDK grew its own copy when the product-group payloads moved to productIdentifier. The copies disagreed: the SDK accepted https:///p/1 and did:web: because it tested a prefix and a non-empty remainder, while the domain tested the authority and the W3C grammar. A plugin is the first thing to see product group data, so the weaker of the two copies was the one on the outside.

Kept dependency-free and no_std so the Wasm guest SDK can call the same code the host does, rather than a second reading of the same clause.

Enums§

DidRejection
Why a candidate scheme 3 value is not an admissible DID.
Gs1ValueRejection
Why a candidate AI 10 or AI 21 value cannot be printed.

Constants§

DID_METHODS
The DID methods EN 18219 scheme 3 names.
MAX_GS1_LOT_CHARS
The most characters a GS1 AI 10 batch or lot number may carry.
MAX_GS1_SERIAL_CHARS
The most characters a GS1 AI 21 serial number may carry.

Functions§

check_did
A DID under one of the methods DID_METHODS names.
check_gs1_lot
A value GS1 admits in AI 10: one to MAX_GS1_LOT_CHARS characters, all in CSET 82.
check_gs1_serial
A value GS1 admits in AI 21: one to MAX_GS1_SERIAL_CHARS characters, all in CSET 82.
is_absolute_web_url
An absolute http/https URL with a host, as EN 18219 scheme 2 requires.
is_cset_82
Whether c belongs to GS1 CSET 82, the character set of every X-typed Application Identifier component — AI 10 and AI 21 among them.