Function dnsoverhttps::resolve_host[][src]

pub fn resolve_host(host: &str) -> Result<Vec<IpAddr>, Error>

Resolve the host specified by host as a list of IpAddr.

This method queries the pre-defined default server over HTTPS for both IPv4 and IPv6 addresses.

If the host cannot be found, the list will be empty. If any errors are encountered during the resolving, the error is returned.

Example

let addr = dnsoverhttps::resolve_host("example.com");