Function is_valid_hostname

Source
fn is_valid_hostname(hostname: &str) -> bool
Expand description

Check whether hostname is a valid hostname or not.

(Note that IPv6 addresses don’t follow these rules.)