Type Alias hickory_resolver::name_server::GenericNameServer

source ·
pub type GenericNameServer<R> = NameServer<GenericConnector<R>>;
Expand description

Specifies the details of a remote NameServer used for lookups

Aliased Type§

struct GenericNameServer<R> { /* private fields */ }

Implementations

source§

impl<P> NameServer<P>

source

pub fn new( config: NameServerConfig, options: ResolverOpts, connection_provider: P, ) -> Self

Construct a new Nameserver with the configuration and options. The connection provider will create UDP and TCP sockets

source

pub fn trust_nx_responses(&self) -> bool

Specifies that this NameServer will treat negative responses as permanent failures and will not retry

Trait Implementations

source§

impl<P: Clone + ConnectionProvider> Clone for NameServer<P>
where P::Conn: Clone,

source§

fn clone(&self) -> NameServer<P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<P> Debug for NameServer<P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<P> DnsHandle for NameServer<P>

§

type Response = Pin<Box<dyn Stream<Item = Result<DnsResponse, ResolveError>> + Send>>

The associated response from the response stream, this should resolve to the Response messages
§

type Error = ResolveError

Error of the response, generally this will be ProtoError
source§

fn is_verifying_dnssec(&self) -> bool

Only returns true if and only if this DNS handle is validating DNSSEC. Read more
source§

fn send<R: Into<DnsRequest> + Unpin + Send + 'static>( &self, request: R, ) -> Self::Response

Send a message via the channel in the client Read more
source§

fn is_using_edns(&self) -> bool

Allow for disabling EDNS
source§

fn lookup(&self, query: Query, options: DnsRequestOptions) -> Self::Response

A classic DNS query Read more
source§

impl<P> Ord for NameServer<P>

source§

fn cmp(&self, other: &Self) -> Ordering

Custom implementation of Ord for NameServer which incorporates the performance of the connection into it’s ranking

1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<P> PartialEq for NameServer<P>

source§

fn eq(&self, other: &Self) -> bool

NameServers are equal if the config (connection information) are equal

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<P> PartialOrd for NameServer<P>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<P> Eq for NameServer<P>