Skip to main content

Module validation

Module validation 

Source
Expand description

Shared low-level format validators.

These live in cloudillo-types so that both the high-level Action DSL (cloudillo-action) and the low-level federation request client (cloudillo-core) can use the exact same definition without creating a dependency cycle between those crates.

Functionsยง

canonicalize_dns_host
Canonical form of a DNS host name โ€” the same UTS #46 U-label canonicalize_id_tag produces, without the id_tag length policy.
canonicalize_id_tag
Canonical stored form of an id_tag: the UTS #46 U-label โ€” decoded Unicode, case-folded, NFC-normalised.
dns_host_to_unicode_lossy
The canonical U-label form of a DNS host, falling back to the input verbatim when it cannot be decoded.
id_tag_to_ascii
The A-label (punycode) form, for DNS, URLs and TLS. Never store this โ€” canonicalize_id_tag defines the stored form.
id_tag_to_ascii_lossy
The A-label for use in a hostname, falling back to the input verbatim when it cannot be encoded.
validate_id_tag
Validate an id_tag: true iff it is already canonical.