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
[src]
Construct a new ResolverFuture with the associated Client and configuration.
Arguments
config
- configuration, name_servers, etc. for the Resolveroptions
- basic lookup options for the resolverreactor
- the [tokio_core::Core
] to use with this future
fn from_system_conf(reactor: &Handle) -> ResolveResult<Self>
[src]
Constructs a new Resolver with the system configuration.
This will use /etc/resolv.conf
on Unix OSes and the registry on Windows.
fn lookup<N: IntoName>(&self, name: N, record_type: RecordType) -> LookupFuture
[src]
Generic lookup for any RecordType
WARNING this interface may change in the future, see if one of the specializations would be better.
Arguments
name
- name of the record to lookup, if name is not a valid domain name, an error will be returnedrecord_type
- type of record to lookup, all RecordData responses will be filtered to this type
Returns
fn lookup_ip(&self, host: &str) -> LookupIpFuture
[src]
Performs a dual-stack DNS lookup for the IP for the given hostname.
See the configuration and options parameters for controlling the way in which A(Ipv4) and AAAA(Ipv6) lookups will be performed. 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.
fn lookup_service(
&self,
service: &str,
protocol: &str,
name: &str
) -> SrvLookupFuture
[src]
&self,
service: &str,
protocol: &str,
name: &str
) -> SrvLookupFuture
Performs a DNS lookup for an SRV record for the specified service type and protocol at the given name.
This is a convenience method over lookup_srv
, it combines the service, protocol and name into a single name: _service._protocol.name
.
Arguments
service
- service to lookup, e.g. ldap or httpprotocol
- wire protocol, e.g. udp or tcpname
- zone or other name at which the service is located.
fn reverse_lookup(&self, query: IpAddr) -> ReverseLookupFuture
[src]
Performs a lookup for the associated type.
Arguments
query
- a type which can be converted toName
viaFrom
.
fn ipv4_lookup<N: IntoName>(&self, query: N) -> Ipv4LookupFuture
[src]
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
fn ipv6_lookup<N: IntoName>(&self, query: N) -> Ipv6LookupFuture
[src]
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
fn mx_lookup<N: IntoName>(&self, query: N) -> MxLookupFuture
[src]
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
fn srv_lookup<N: IntoName>(&self, query: N) -> SrvLookupFuture
[src]
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error
fn txt_lookup<N: IntoName>(&self, query: N) -> TxtLookupFuture
[src]
Performs a lookup for the associated type.
hint queries that end with a '.' are fully qualified names and are cheaper lookups
Arguments
query
- a string which parses to a domain name, failure to parse will return an error