pub struct Label(/* private fields */);Expand description
A domain label: a value that CANNOT be invented.
§Why a type where &'static [u8] used to suffice
I-12 requires unique, prefix-free labels, guarded by
four probes: uniqueness, prefix-freeness, versioning, and agreement with
specification §3.6. All four inspect ALL, the REGISTRY. They never saw
call sites: Transcript::new and seal::slot_info
accepted arbitrary bytes, and a caller could pass
b"CC/v1/lease-cache", a string absent from the registry and extending
LEASE. No probe would detect that, because it would
check the list rather than the call.
The new type closes exactly this gap: Label values come ONLY
from this module’s constants because the constructor is private and the field
is not public. The registry’s guarantee becomes a guarantee of every call,
checked by the compiler rather than a probe.
§Why Debug prints the string itself
A label is not secret: it is plaintext in every file and in the specification.
I-11 forbids secrets in Debug, not domain names; hiding
the label would blind signature-failure debugging without the slightest
benefit.