Skip to main content

GetResponse

Trait 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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Source§

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

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,