[][src]Function domain_resolv::lookup::host::lookup_host

pub async fn lookup_host<R: Resolver, '_>(
    resolver: &'_ R,
    qname: impl ToDname
) -> Result<FoundHosts<R>, Error>

Creates a future that resolves a host name into its IP addresses.

The future will use the resolver given in resolv to query the DNS for the IPv4 and IPv6 addresses associated with name.

The value returned upon success can be turned into an iterator over IP addresses or even socket addresses. Since the lookup may determine that the host name is in fact an alias for another name, the value will also return the canonical name.