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

name_servers: Vec<SocketAddr>

List of name servers; must not be empty

search: Vec<String>

List of search domains

n_dots: u32

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

timeout: Duration

Duration before retrying or failing an unanswered request

attempts: u32

Number of attempts made before returning an error

rotate: bool

Whether to rotate through available nameservers

use_inet6: bool

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

Trait Implementations

impl Debug for DnsConfig
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for DnsConfig
[src]

fn clone(&self) -> DnsConfig

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more