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]
pub fn new() -> Self[src]
Creates a new empty configuration
pub fn from_parts(
domain: Option<Name>,
search: Vec<Name>,
name_servers: Vec<NameServerConfig>
) -> Self[src]
domain: Option<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 theNamebeing looked up is not an FQDN, then this is the first part appended to attempt a lookup.ndotsin theResolverOptiondoes take precedence over this.search- additional search domains that are attempted if theNameis 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.4and2001:4860:4860::8888,2001:4860:4860::8844
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]
Set the domain of the entity querying results.
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]
Add a search domain
pub fn add_name_server(&mut self, name_server: NameServerConfig)[src]
Add the configuration for a name server
pub fn name_servers(&self) -> &[NameServerConfig][src]
Returns a reference to the name servers
Trait Implementations
impl Clone for 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]
Performs copy-assignment from source. Read more
impl Debug for ResolverConfig[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialEq for ResolverConfig[src]
fn eq(&self, __arg_0: &ResolverConfig) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ResolverConfig) -> bool[src]
This method tests for !=.
impl Eq for ResolverConfig[src]
impl Default for ResolverConfig[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 the system configuration see: Resolver::from_system_conf and ResolverFuture::from_system_conf