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

Used to configure the behaviour of the resolver.

Implementations§

Returns a fresh Options, on which no values are set.

Set flags controlling the behaviour of the resolver.

Set the number of milliseconds each name server is given to respond to a query on the first try. (After the first try, the timeout algorithm becomes more complicated, but scales linearly with the value of timeout). The default is 5000ms.

Set the number of tries the resolver will try contacting each name server before giving up. The default is four tries.

Set the number of dots which must be present in a domain name for it to be queried for “as is” prior to querying for it with the default domain extensions appended. The default value is 1 unless set otherwise by resolv.conf or the RES_OPTIONS environment variable.

Set the UDP port to use for queries. The default value is 53, the standard name service port.

Set the TCP port to use for queries. The default value is 53, the standard name service port.

Set the domains to search, instead of the domains specified in resolv.conf or the domain derived from the kernel hostname variable.

Set the lookups to perform for host queries. lookups should be set to a string of the characters “b” or “f”, where “b” indicates a DNS lookup and “f” indicates a lookup in the hosts file.

The path to use for reading the resolv.conf file. The resolvconf_path should be set to a path string, and will be honoured on *nix like systems. The default is /etc/resolv.conf,

Set the socket send buffer size.

Set the socket receive buffer size.

Configure round robin selection of nameservers.

Prevent round robin selection of nameservers.

Set the EDNS packet size.

Trait Implementations§

Returns the “default value” for a type. Read more

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.