Struct resolve::config::DnsConfig [] [src]

pub struct DnsConfig {
    pub name_servers: Vec<SocketAddr>,
    pub search: Vec<String>,
    pub n_dots: u32,
    pub timeout: Duration,
    pub attempts: u32,
    pub rotate: bool,
    pub use_inet6: bool,
}

Configures the behavior of DNS requests

Fields

List of name servers; must not be empty

List of search domains

Minimum number of dots in a name to trigger an initial absolute query

Duration before retrying or failing an unanswered request

Number of attempts made before returning an error

Whether to rotate through available nameservers

If true, perform AAAA queries first and return IPv4 addresses as IPv4-mapped IPv6 addresses.

Methods

impl DnsConfig
[src]

[src]

Returns the default system configuration for DNS requests.

[src]

Returns a DnsConfig using the given set of name servers, setting all other fields to generally sensible default values.

Trait Implementations

impl Clone for DnsConfig
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for DnsConfig
[src]

[src]

Formats the value using the given formatter.