Trait trust_dns_proto::xfer::dns_handle::DnsHandle
source · pub trait DnsHandle: 'static + Clone + Send {
type Response: Future<Item = DnsResponse, Error = ProtoError> + 'static + Send;
fn send<R: Into<DnsRequest>>(&mut self, request: R) -> Self::Response;
fn is_verifying_dnssec(&self) -> bool { ... }
fn lookup(
&mut self,
query: Query,
options: DnsRequestOptions
) -> Self::Response { ... }
}
Expand description
A trait for implementing high level functions of DNS.
Required Associated Types
sourcetype Response: Future<Item = DnsResponse, Error = ProtoError> + 'static + Send
type Response: Future<Item = DnsResponse, Error = ProtoError> + 'static + Send
The associated response from the response future, this should resolve to the Response message
Required Methods
sourcefn send<R: Into<DnsRequest>>(&mut self, request: R) -> Self::Response
fn send<R: Into<DnsRequest>>(&mut self, request: R) -> Self::Response
Send a message via the channel in the client
Arguments
request
- the fully constructed Message to send, note that most implementations of will most likely be required to rewrite the QueryId, do no rely on that as being stable.
Provided Methods
sourcefn is_verifying_dnssec(&self) -> bool
fn is_verifying_dnssec(&self) -> bool
Ony 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.