Struct trust_dns_resolver::config::ResolverOpts [−][src]
pub struct ResolverOpts { pub ndots: usize, pub timeout: Duration, pub attempts: usize, pub validate: bool, pub ip_strategy: LookupIpStrategy, pub cache_size: usize, pub use_hosts_file: bool, // some fields omitted }
Configuration for the Resolver
Fields
ndots: usize
Sets the number of dots that must appear (unless it's a final dot representing the root)
that must appear before a query is assumted to include the TLD. The default is one, which
means that www
would never be assumed to be a TLD, and would always be appended to either
the search
timeout: Duration
Specify the timeout for a request. Defaults to 5 seconds
attempts: usize
Number of attempts before giving up. Defaults to 2
validate: bool
Use DNSSec to validate the request
ip_strategy: LookupIpStrategy
The ip_strategy for the Resolver to use when lookup Ipv4 or Ipv6 addresses
cache_size: usize
Cache size is in number of records (some records can be large)
use_hosts_file: bool
Check /ect/hosts file before dns requery (only works for unix like OS)
Trait Implementations
impl Debug for ResolverOpts
[src]
impl Debug for ResolverOpts
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for ResolverOpts
[src]
impl Clone for ResolverOpts
fn clone(&self) -> ResolverOpts
[src]
fn clone(&self) -> ResolverOpts
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for ResolverOpts
[src]
impl Copy for ResolverOpts
impl Eq for ResolverOpts
[src]
impl Eq for ResolverOpts
impl PartialEq for ResolverOpts
[src]
impl PartialEq for ResolverOpts
fn eq(&self, other: &ResolverOpts) -> bool
[src]
fn eq(&self, other: &ResolverOpts) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ResolverOpts) -> bool
[src]
fn ne(&self, other: &ResolverOpts) -> bool
This method tests for !=
.
impl Default for ResolverOpts
[src]
impl Default for ResolverOpts
fn default() -> Self
[src]
fn default() -> Self
Default values for the Reolver configuration.
This follows the resolv.conf defaults as defined in the Linux man pages
Auto Trait Implementations
impl Send for ResolverOpts
impl Send for ResolverOpts
impl Sync for ResolverOpts
impl Sync for ResolverOpts