idna

Function domain_to_ascii

Source
pub fn domain_to_ascii(domain: &str) -> Result<String, Errors>
Expand description

The domain to ASCII algorithm.

Return the ASCII representation a domain name, normalizing characters (upper-case to lower-case and other kinds of equivalence) and using Punycode as necessary.

This process may fail.