[−][src]Struct async_std_resolver::config::ResolverOpts
Configuration for the Resolver
Fields
ndots: usizeSets the number of dots that must appear (unless it's a final dot representing the root)
that must appear before a query is assumed 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: DurationSpecify the timeout for a request. Defaults to 5 seconds
attempts: usizeNumber of attempts before giving up. Defaults to 2
rotate: boolRotate through the resource records in the response (if there is more than one for a given name)
check_names: boolValidate the names in the response, not implemented don't really see the point unless you need to support badly configured DNS
edns0: boolEnable edns, for larger records
validate: boolUse DNSSec to validate the request
ip_strategy: LookupIpStrategyThe ip_strategy for the Resolver to use when lookup Ipv4 or Ipv6 addresses
cache_size: usizeCache size is in number of records (some records can be large)
use_hosts_file: boolCheck /ect/hosts file before dns requery (only works for unix like OS)
positive_min_ttl: Option<Duration>Optional minimum TTL for positive responses.
If this is set, any positive responses with a TTL lower than this value will have a TTL of
positive_min_ttl instead. Otherwise, this will default to 0 seconds.
negative_min_ttl: Option<Duration>Optional minimum TTL for negative (NXDOMAIN) responses.
If this is set, any positive responses with a TTL lower than this value will have a TTL of
negative_min_ttl instead. Otherwise, this will default to 0 seconds.
positive_max_ttl: Option<Duration>Optional maximum TTL for positive responses.
If this is set, any positive responses with a TTL higher than this value will have a TTL of
positive_max_ttl instead. Otherwise, this will default to MAX_TTL seconds.
negative_max_ttl: Option<Duration>Optional maximum TTL for negative (NXDOMAIN) responses.
If this is set, any positive responses with a TTL higher than this value will have a TTL of
negative_max_ttl instead. Otherwise, this will default to MAX_TTL seconds.
distrust_nx_responses: boolDefault is to distrust negative responses from upstream nameservers
Currently only SERVFAIL responses are continued on, this may be expanded to include NXDOMAIN or NoError/Empty responses
num_concurrent_reqs: usizeConcurrent requests where more than one Nameserver is registered, the default is 2
0 or 1 will configure this to execute all requests serially
preserve_intermediates: boolPreserve all intermediate records in the lookup response, suchas CNAME records
Trait Implementations
impl Clone for ResolverOpts[src]
fn clone(&self) -> ResolverOpts[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for ResolverOpts[src]
impl Debug for ResolverOpts[src]
impl Default for ResolverOpts[src]
fn default() -> ResolverOpts[src]
Default values for the Resolver configuration.
This follows the resolv.conf defaults as defined in the Linux man pages
impl Eq for ResolverOpts[src]
impl PartialEq<ResolverOpts> for ResolverOpts[src]
fn eq(&self, other: &ResolverOpts) -> bool[src]
fn ne(&self, other: &ResolverOpts) -> bool[src]
impl StructuralEq for ResolverOpts[src]
impl StructuralPartialEq for ResolverOpts[src]
Auto Trait Implementations
impl RefUnwindSafe for ResolverOpts
impl Send for ResolverOpts
impl Sync for ResolverOpts
impl Unpin for ResolverOpts
impl UnwindSafe for ResolverOpts
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,