Skip to main content

dpp_digital_link/
lib.rs

1//! `dpp-digital-link` — GS1 Digital Link parsing and building, and GS1 link-type
2//! negotiation.
3//!
4//! Pure, stateless crate with no I/O or network dependencies. Compiles to both
5//! `std` and `wasm32`.
6//!
7//! This crate previously also carried AAS mapping and a JSON-LD context behind
8//! its name. Both have moved out — the AAS projection to [`dpp-aas`], the
9//! JSON-LD context to `dpp-vc` — and neither is reachable from here, which is
10//! the point: a consumer that wants a GS1 parser no longer compiles an AAS
11//! mapper to get one.
12//!
13//! [`dpp-aas`]: https://docs.rs/dpp-aas
14
15pub mod digital_link;
16pub mod linktype;
17
18pub use digital_link::{
19    AI_TABLE, AiDescriptor, AiRole, DigitalLink, DigitalLinkError, ai_descriptor, build_qr_url,
20    short_serial, validate_gtin,
21};
22pub use linktype::{
23    Audience, DppMediaType, Gs1LinkType, LinkDescriptor, ResolutionRequest, negotiate,
24};
25
26/// Compile-checks this crate's README examples.
27///
28/// A README example is a public claim about the API, and nothing else in the
29/// build compiles one. Without this, a README can advertise a function that
30/// does not exist — which is exactly what happened before this harness landed.
31#[cfg(doctest)]
32#[doc = include_str!("../README.md")]
33struct ReadmeDoctests;