Struct actix_connect::resolver::ResolverConfig [−][src]
pub struct ResolverConfig { /* fields omitted */ }
Expand description
Configuration for the upstream nameservers to use for resolution
Implementations
Creates a new empty configuration
Creates a default configuration, using 8.8.8.8
, 8.8.4.4
and 2001:4860:4860::8888
, 2001:4860:4860::8844
(thank you, Google).
Please see Google’s privacy statement for important information about what they track, many ISP’s track similar information in DNS. To use the system configuration see: Resolver::from_system_conf
and AsyncResolver::from_system_conf
NameServerConfigGroups can be combined to use a set of different providers, see NameServerConfigGroup
and ResolverConfig::from_parts
Creates a default configuration, using 1.1.1.1
, 1.0.0.1
and 2606:4700:4700::1111
, 2606:4700:4700::1001
(thank you, Cloudflare).
Please see: https://www.cloudflare.com/dns/
NameServerConfigGroups can be combined to use a set of different providers, see NameServerConfigGroup
and ResolverConfig::from_parts
Creates a configuration, using 9.9.9.9
and 2620:fe::fe
, the “secure” variants of the quad9 settings (thank you, Quad9).
Please see: https://www.quad9.net/faq/
NameServerConfigGroups can be combined to use a set of different providers, see NameServerConfigGroup
and ResolverConfig::from_parts
pub fn from_parts<G>(
domain: Option<Name>,
search: Vec<Name, Global>,
name_servers: G
) -> ResolverConfig where
G: Into<NameServerConfigGroup>,
pub fn from_parts<G>(
domain: Option<Name>,
search: Vec<Name, Global>,
name_servers: G
) -> ResolverConfig where
G: Into<NameServerConfigGroup>,
Create a ResolverConfig with all parts specified
Arguments
domain
- domain of the entity querying results. If theName
being looked up is not an FQDN, then this is the first part appended to attempt a lookup.ndots
in theResolverOption
does take precedence over this.search
- additional search domains that are attempted if theName
is not found indomain
, defaults tovec![]
name_servers
- set of name servers to use for lookups, defaults are Google:8.8.8.8
,8.8.4.4
and2001:4860:4860::8888
,2001:4860:4860::8844
Returns the local domain
By default any names will be appended to all non-fully-qualified-domain names, and searched for after any ndots rules
Set the domain of the entity querying results.
Returns the search domains
These will be queried after any local domain and then in the order of the set of search domains
Add a search domain
Add the configuration for a name server
Trait Implementations
Creates a default configuration, using 8.8.8.8
, 8.8.4.4
and 2001:4860:4860::8888
, 2001:4860:4860::8844
(thank you, Google).
Please see Google’s privacy statement for important information about what they track, many ISP’s track similar information in DNS. To use the system configuration see: Resolver::from_system_conf
and AsyncResolver::from_system_conf
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ResolverConfig
impl Send for ResolverConfig
impl Sync for ResolverConfig
impl Unpin for ResolverConfig
impl UnwindSafe for ResolverConfig
Blanket Implementations
Mutably borrows from an owned value. Read more