Trait trust_dns_proto::xfer::dns_handle::DnsHandle [−][src]
pub trait DnsHandle: Clone + Send { type Error: FromProtoError; fn send<R: Into<DnsRequest>>(
&mut self,
request: R
) -> Box<Future<Item = DnsResponse, Error = Self::Error> + Send>; fn is_verifying_dnssec(&self) -> bool { ... } fn lookup(
&mut self,
query: Query,
options: DnsRequestOptions
) -> Box<Future<Item = DnsResponse, Error = Self::Error> + Send> { ... } }
A trait for implementing high level functions of DNS.
Associated Types
type Error: FromProtoError
The associated error type returned by future send operations
Required Methods
fn send<R: Into<DnsRequest>>(
&mut self,
request: R
) -> Box<Future<Item = DnsResponse, Error = Self::Error> + Send>
&mut self,
request: R
) -> Box<Future<Item = DnsResponse, Error = Self::Error> + Send>
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
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.
fn lookup(
&mut self,
query: Query,
options: DnsRequestOptions
) -> Box<Future<Item = DnsResponse, Error = Self::Error> + Send>
&mut self,
query: Query,
options: DnsRequestOptions
) -> Box<Future<Item = DnsResponse, Error = Self::Error> + Send>
A classic DNS query
This is identical to query
, but instead takes a Query
object.
Arguments
query
- the query to lookup
Implementors
impl<E> DnsHandle for BasicDnsHandle<E> where
E: FromProtoError + 'static, type Error = E;impl<H, E> DnsHandle for RetryDnsHandle<H> where
H: DnsHandle<Error = E> + 'static,
E: FromProtoError + 'static, type Error = <H as DnsHandle>::Error;