Trait DnsHandle
pub trait DnsHandle:
'static
+ Clone
+ Send
+ Sync
+ Unpin {
type Response: Stream<Item = Result<DnsResponse, ProtoError>> + Send + Unpin + 'static;
// Required method
fn send<R>(&self, request: R) -> Self::Response
where R: Into<DnsRequest> + Unpin + Send + 'static;
// Provided methods
fn is_verifying_dnssec(&self) -> bool { ... }
fn is_using_edns(&self) -> bool { ... }
fn lookup(&self, query: Query, options: DnsRequestOptions) -> Self::Response { ... }
}Available on crate feature
dns only.Expand description
A trait for implementing high level functions of DNS.
Required Associated Types§
type Response: Stream<Item = Result<DnsResponse, ProtoError>> + Send + Unpin + 'static
type Response: Stream<Item = Result<DnsResponse, ProtoError>> + Send + Unpin + 'static
The associated response from the response stream, this should resolve to the Response messages
Required Methods§
Provided Methods§
fn is_verifying_dnssec(&self) -> bool
fn is_verifying_dnssec(&self) -> bool
Only returns true if and only if this DNS handle is validating DNSSEC.
If the DnsHandle impl is wrapping other clients, then the correct option is to delegate the question to the wrapped client.
fn is_using_edns(&self) -> bool
fn is_using_edns(&self) -> bool
Allow for disabling EDNS
fn lookup(&self, query: Query, options: DnsRequestOptions) -> Self::Response
Available on crate features std or no-std-rand only.
fn lookup(&self, query: Query, options: DnsRequestOptions) -> Self::Response
std or no-std-rand only.A classic DNS query
This is identical to query, but instead takes a Query object.
§Arguments
query- the query to lookupoptions- options to use when constructing the message
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
§impl DnsHandle for GenericConnection
impl DnsHandle for GenericConnection
§impl DnsHandle for BufDnsRequestStreamHandle
Available on crate feature std only.
impl DnsHandle for BufDnsRequestStreamHandle
Available on crate feature
std only.type Response = DnsResponseReceiver
§impl DnsHandle for DnsExchange
Available on crate features std or no-std-rand only.
impl DnsHandle for DnsExchange
Available on crate features
std or no-std-rand only.type Response = DnsExchangeSend
§impl<H> DnsHandle for RetryDnsHandle<H>
Available on crate features std or no-std-rand only.
impl<H> DnsHandle for RetryDnsHandle<H>
Available on crate features
std or no-std-rand only.