pub struct FutureResolver { /* private fields */ }
Expand description

An asynchronous DNS resolver, which returns results as futures::Futures.

Note that dropping the FutureResolver does not cause outstanding queries to fail - contrast the Resolver - because the returned futures hold a reference to the underlying resolver.

Implementations§

Create a new FutureResolver, using default Options.

Create a new FutureResolver, with the given Options.

Set the list of servers to contact, instead of the servers specified in resolv.conf or the local named.

String format is host[:port]. IPv6 addresses with ports require square brackets eg [2001:4860:4860::8888]:53.

Set the local IPv4 address from which to make queries.

Set the local IPv6 address from which to make queries.

Set the local device from which to make queries.

Initializes an address sortlist configuration, so that addresses returned by get_host_by_name() are sorted according to the sortlist.

Each element of the sortlist holds an IP-address/netmask pair. The netmask is optional but follows the address after a slash if present. For example: “130.155.160.0/255.255.240.0”, or “130.155.0.0”.

Look up the A records associated with name.

Search for the A records associated with name.

Look up the AAAA records associated with name.

Search for the AAAA records associated with name.

Look up the CAA records associated with name.

Search for the CAA records associated with name.

Look up the CNAME records associated with name.

Search for the CNAME records associated with name.

Look up the MX records associated with name.

Search for the MX records associated with name.

Look up the NAPTR records associated with name.

Search for the NAPTR records associated with name.

Look up the NS records associated with name.

Search for the NS records associated with name.

Look up the PTR records associated with name.

Search for the PTR records associated with name.

Look up the SOA records associated with name.

Search for the SOA records associated with name.

Look up the SRV records associated with name.

Search for the SRV records associated with name.

Look up the TXT records associated with name.

Search for the TXT records associated with name.

Look up the URI records associated with name.

Search for the URI records associated with name.

Perform a host query by address.

This method is one of the very few places where this library performs strictly more allocation than the underlying c-ares code. If this is a problem for you, you should prefer to use the analogous method on the Resolver.

Perform a host query by name.

This method is one of the very few places where this library performs strictly more allocation than the underlying c-ares code. If this is a problem for you, you should prefer to use the analogous method on the Resolver.

Address-to-nodename translation in protocol-independent manner.

This method is one of the very few places where this library performs strictly more allocation than the underlying c-ares code. If this is a problem for you, you should prefer to use the analogous method on the Resolver.

Initiate a single-question DNS query for name. The class and type of the query are per the provided parameters, taking values as defined in arpa/nameser.h.

This method is one of the very few places where this library performs strictly more allocation than the underlying c-ares code. If this is a problem for you, you should prefer to use the analogous method on the Resolver.

This method is provided so that users can query DNS types for which c-ares does not provide a parser; or in case a third-party parser is preferred. Usually, if a suitable query_xxx() is available, that should be used.

Initiate a series of single-question DNS queries for name. The class and type of the query are per the provided parameters, taking values as defined in arpa/nameser.h.

This method is one of the very few places where this library performs strictly more allocation than the underlying c-ares code. If this is a problem for you, you should prefer to use the analogous method on the Resolver.

This method is provided so that users can search DNS types for which c-ares does not provide a parser; or in case a third-party parser is preferred. Usually, if a suitable search_xxx() is available, that should be used.

Cancel all requests made on this FutureResolver.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.