Struct trust_dns_resolver::ResolverFuture
[−]
[src]
pub struct ResolverFuture { /* fields omitted */ }
A Resolver for DNS records.
Methods
impl ResolverFuture
[src]
fn new(config: ResolverConfig, options: ResolverOpts, reactor: Handle) -> Self
Construct a new ResolverFuture with the associated Client.
fn lookup_ip(&mut self, host: &str) -> LookupIpFuture
Performs a DNS lookup for the IP for the given hostname.
Based on the configuration and options passed in, this may do either a A or a AAAA lookup, returning IpV4 or IpV6 addresses. (Note: current release only queries A, IPv4)
Arguments
host
- string hostname, if this is an invalid hostname, an error will be thrown. Currently this must be a FQDN, with a trailing.
, e.g.www.example.com.
. This will be fixed in a future release.