Struct trust_dns_resolver::config::ResolverConfig [−][src]
pub struct ResolverConfig { /* fields omitted */ }
Expand description
Configuration for the upstream nameservers to use for resolution
Implementations
impl ResolverConfig
[src]
impl ResolverConfig
[src]pub fn google() -> Self
[src]
pub fn google() -> Self
[src]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
pub fn cloudflare() -> Self
[src]
pub fn cloudflare() -> Self
[src]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
pub fn quad9() -> Self
[src]
pub fn quad9() -> Self
[src]Creates a configuration, using 9.9.9.9
, 149.112.112.112
and 2620:fe::fe
, 2620:fe::fe:9
, 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: Into<NameServerConfigGroup>>(
domain: Option<Name>,
search: Vec<Name>,
name_servers: G
) -> Self
[src]
pub fn from_parts<G: Into<NameServerConfigGroup>>(
domain: Option<Name>,
search: Vec<Name>,
name_servers: G
) -> Self
[src]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
pub fn domain(&self) -> Option<&Name>
[src]
pub fn domain(&self) -> Option<&Name>
[src]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
pub fn set_domain(&mut self, domain: Name)
[src]
pub fn set_domain(&mut self, domain: Name)
[src]Set the domain of the entity querying results.
pub fn search(&self) -> &[Name]ⓘ
[src]
pub fn search(&self) -> &[Name]ⓘ
[src]Returns the search domains
These will be queried after any local domain and then in the order of the set of search domains
pub fn add_search(&mut self, search: Name)
[src]
pub fn add_search(&mut self, search: Name)
[src]Add a search domain
pub fn add_name_server(&mut self, name_server: NameServerConfig)
[src]
pub fn add_name_server(&mut self, name_server: NameServerConfig)
[src]Add the configuration for a name server
Trait Implementations
impl Clone for ResolverConfig
[src]
impl Clone for ResolverConfig
[src]fn clone(&self) -> ResolverConfig
[src]
fn clone(&self) -> ResolverConfig
[src]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)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for ResolverConfig
[src]
impl Debug for ResolverConfig
[src]impl Default for ResolverConfig
[src]
impl Default for ResolverConfig
[src]fn default() -> Self
[src]
fn default() -> Self
[src]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
impl PartialEq<ResolverConfig> for ResolverConfig
[src]
impl PartialEq<ResolverConfig> for ResolverConfig
[src]fn eq(&self, other: &ResolverConfig) -> bool
[src]
fn eq(&self, other: &ResolverConfig) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &ResolverConfig) -> bool
[src]
fn ne(&self, other: &ResolverConfig) -> bool
[src]This method tests for !=
.
impl Eq for ResolverConfig
[src]
impl StructuralEq for ResolverConfig
[src]
impl StructuralPartialEq for ResolverConfig
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,