silk.json.schema_format_idna.

International hostname validation for JSON Schema using Unicode 16.0.0 UTS #46 mapping.

Mapping is nontransitional. IDNA2008 contextual rules, canonical Punycode, DNS wire lengths, NFC, and the domain-wide RFC 5893 bidirectional rule are checked without DNS access.

Public declarations: 1.

check#

silk
pub effect fn check(value: string) -> bool ! OutOfMemoryError ? &mut Allocator

Returns whether a name passes nontransitional UTS #46 and IDNA2008 hostname checks. Empty labels and trailing dots are rejected. Allocation failures propagate to the caller.

Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.

View the source of this page