pub fn parse_ip_and_validate_domain(
host: &str,
) -> Result<Option<IPAddress>, Error>
Expand description
Parses the optional IP address from the host
string.
If the host is not an IP address the domain will be validated (case-insensitively).
Returns Ok(Some(ip_address))
if the host
is an IP address.
Returns Ok(None)
if the host
is a domain name.
Returns Err(InvalidHost)
if the host
is invalid.