Struct trust_dns_resolver::ResolverFuture [] [src]

pub struct ResolverFuture { /* fields omitted */ }

A Resolver for DNS records.

Methods

impl ResolverFuture
[src]

Construct a new ResolverFuture with the associated Client.

Constructs a new Resolver with the given ClientConnection, see UdpClientConnection and/or TcpCLientConnection

This will read the systems /etc/cresolv.conf. Only Unix like OSes are currently supported.

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). For the least expensive query a fully-qualified-domain-name, FQDN, which ends in a final ., e.g. www.example.com., will only issue one query. anything else will always incur the cost of querying the ResolverConfig::domain and ResolverConfig::search.

Arguments

  • host - string hostname, if this is an invalid hostname, an error will be returned from the returned future.