Struct async_std_resolver::config::NameServerConfig
source · [−]pub struct NameServerConfig {
pub socket_addr: SocketAddr,
pub protocol: Protocol,
pub tls_dns_name: Option<String>,
pub trust_nx_responses: bool,
pub bind_addr: Option<SocketAddr>,
}
Expand description
Configuration for the NameServer
Fields
socket_addr: SocketAddr
The address which the DNS NameServer is registered at.
protocol: Protocol
The protocol to use when communicating with the NameServer.
tls_dns_name: Option<String>
SPKI name, only relevant for TLS connections
trust_nx_responses: bool
Whether to trust NXDOMAIN
responses from upstream nameservers.
When this is true
, and an empty NXDOMAIN
response is received, the
query will not be retried against other configured name servers.
(On an empty NoError
response, or a response with any other error
response code, the query will still be retried regardless of this
configuration setting.)
Defaults to false.
bind_addr: Option<SocketAddr>
The client address (IP and port) to use for connecting to the server.
Implementations
sourceimpl NameServerConfig
impl NameServerConfig
sourcepub fn new(socket_addr: SocketAddr, protocol: Protocol) -> NameServerConfig
pub fn new(socket_addr: SocketAddr, protocol: Protocol) -> NameServerConfig
Constructs a Nameserver configuration with some basic defaults
Trait Implementations
sourceimpl Clone for NameServerConfig
impl Clone for NameServerConfig
sourcefn clone(&self) -> NameServerConfig
fn clone(&self) -> NameServerConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NameServerConfig
impl Debug for NameServerConfig
sourceimpl Display for NameServerConfig
impl Display for NameServerConfig
sourceimpl PartialEq<NameServerConfig> for NameServerConfig
impl PartialEq<NameServerConfig> for NameServerConfig
sourcefn eq(&self, other: &NameServerConfig) -> bool
fn eq(&self, other: &NameServerConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for NameServerConfig
impl StructuralEq for NameServerConfig
impl StructuralPartialEq for NameServerConfig
Auto Trait Implementations
impl RefUnwindSafe for NameServerConfig
impl Send for NameServerConfig
impl Sync for NameServerConfig
impl Unpin for NameServerConfig
impl UnwindSafe for NameServerConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more