Trait domain::net::client::request::GetResponse

source ·
pub trait GetResponse: Debug {
    // Required method
    fn get_response(
        &mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Message<Bytes>, Error>> + Send + Sync + '_>>;
}
Expand description

Trait for getting the result of a DNS query.

In the future, the return type of get_response should become an associated type. However, too many uses of ‘dyn GetResponse’ currently prevent that.

Required Methods§

source

fn get_response( &mut self, ) -> Pin<Box<dyn Future<Output = Result<Message<Bytes>, Error>> + Send + Sync + '_>>

Get the result of a DNS request.

This function is intended to be cancel safe.

Implementors§

source§

impl GetResponse for domain::net::client::dgram::Request

source§

impl GetResponse for domain::net::client::redundant::Request

source§

impl GetResponse for domain::net::client::stream::Request

source§

impl<CR, Upstream> GetResponse for domain::net::client::cache::Request<CR, Upstream>
where CR: Clone + ComposeRequest + Debug + Sync, Upstream: SendRequest<CR> + Send + Sync + 'static,

source§

impl<S, Req> GetResponse for domain::net::client::dgram_stream::Request<S, Req>
where S: AsyncConnect + Clone + Debug + Send + Sync + 'static, S::Connection: AsyncDgramRecv + AsyncDgramSend + Send + Sync + Unpin, Req: ComposeRequest + Clone + 'static,