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

List of name servers; must not be empty

search

List of search domains

n_dots

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

timeout

Duration before retrying or failing an unanswered request

attempts

Number of attempts made before returning an error

rotate

Whether to rotate through available nameservers

use_inet6

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

Trait Implementations

Derived Implementations

impl Debug for DnsConfig

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

impl Clone for DnsConfig

fn clone(&self) -> DnsConfig

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