Struct trust_dns_resolver::config::ResolverConfig
[−]
[src]
pub struct ResolverConfig { /* fields omitted */ }
Configuration for the upstream nameservers to use for resolution
Methods
impl ResolverConfig
[src]
fn new() -> Self
Creates a new empty configuration
fn from_parts(
domain: Name,
search: Vec<Name>,
name_servers: Vec<NameServerConfig>
) -> Self
domain: Name,
search: Vec<Name>,
name_servers: Vec<NameServerConfig>
) -> Self
Create a ResolverConfig with all parts specified
Arguments
domain
- domain of the entity querying results. If theName
being lookedup is not an FQDN, then this is the first part appended to attempt a lookup.ndots
in in theResolverOption
does take precidence over this. Default should be.
akaName::root
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
fn domain(&self) -> &Name
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
fn search(&self) -> &[Name]
Returns the search domains
These will be queried after any local domain and then in the order of the set of search domains
fn add_name_server(&mut self, name_server: NameServerConfig)
Add the configuration for a name server
fn name_servers(&self) -> &[NameServerConfig]
Returns a reference to the name servers
Trait Implementations
impl Clone for ResolverConfig
[src]
fn clone(&self) -> ResolverConfig
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for ResolverConfig
[src]
impl Default for ResolverConfig
[src]
fn default() -> Self
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).