pub fn hostname_from_url(url: &str) -> Result<String, ()>