Struct trust_dns_resolver::Resolver [] [src]

pub struct Resolver { /* fields omitted */ }

The Resolver is used for performing DNS queries.

For forward (A) lookups, hostname -> IP address, see: Resolver::lookup_ip

Methods

impl Resolver
[src]

[src]

Constructs a new Resolver with the specified configuration.

Arguments

  • config - configuration for the resolver
  • options - resolver options for performing lookups
  • client_connection - ClientConnection for establishing the connection to the DNS server

Returns

A new Resolver

[src]

Constructs a new Resolver with the system configuration.

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

[src]

Generic lookup for any RecordType

Arguments

  • name - name of the record to lookup, if name is not a valid domain name, an error will be returned
  • record_type - type of record to lookup

[src]

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.

[src]

Performs a DNS lookup for an SRV record for the speicified service type and protocol at the given name.

WARNING This interface may change in the future

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 http
  • protocol - wire protocol, e.g. udp or tcp
  • name - zone or other name at which the service is located.

[src]

Performs a lookup for the associated type.

Arguments

  • query - a type which can be converted to Name via From.

[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 str which parses to a domain name, failure to parse will return an error

[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 str which parses to a domain name, failure to parse will return an error

[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 str which parses to a domain name, failure to parse will return an error

[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 str which parses to a domain name, failure to parse will return an error

[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 str which parses to a domain name, failure to parse will return an error