[][src]Trait trust_dns_proto::xfer::dns_handle::DnsHandle

pub trait DnsHandle: 'static + Clone + Send + Sync + Unpin {
    type Response: Future<Output = Result<DnsResponse, Self::Error>> + Send + Unpin + 'static;
    type Error: From<ProtoError> + Error + Clone + Send + Unpin + 'static;
    pub fn send<R: Into<DnsRequest> + Unpin + Send + 'static>(
        &mut self,
        request: R
    ) -> Self::Response; pub fn is_verifying_dnssec(&self) -> bool { ... }
pub fn lookup(
        &mut self,
        query: Query,
        options: DnsRequestOptions
    ) -> Self::Response { ... } }

A trait for implementing high level functions of DNS.

Associated Types

type Response: Future<Output = Result<DnsResponse, Self::Error>> + Send + Unpin + 'static[src]

The associated response from the response future, this should resolve to the Response message

type Error: From<ProtoError> + Error + Clone + Send + Unpin + 'static[src]

Error of the response, generally this will be ProtoError

Loading content...

Required methods

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

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.
Loading content...

Provided methods

pub fn is_verifying_dnssec(&self) -> bool[src]

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.

pub fn lookup(
    &mut self,
    query: Query,
    options: DnsRequestOptions
) -> Self::Response
[src]

A classic DNS query

This is identical to query, but instead takes a Query object.

Arguments

  • query - the query to lookup
Loading content...

Implementors

impl DnsHandle for BufDnsRequestStreamHandle[src]

type Response = OneshotDnsResponseReceiver

type Error = ProtoError

impl DnsHandle for DnsExchange[src]

type Response = DnsExchangeSend

type Error = ProtoError

impl<H> DnsHandle for RetryDnsHandle<H> where
    H: DnsHandle + Send + Unpin + 'static,
    H::Error: RetryableError
[src]

type Response = Pin<Box<dyn Future<Output = Result<DnsResponse, Self::Error>> + Send + Unpin>>

type Error = <H as DnsHandle>::Error

Loading content...