Trait domain::net::client::request::SendRequest

source ·
pub trait SendRequest<CR> {
    // Required method
    fn send_request(
        &self,
        request_msg: CR,
    ) -> Box<dyn GetResponse + Send + Sync>;
}
Expand description

Trait for starting a DNS request based on a request composer.

In the future, the return type of request should become an associated type. However, the use of ‘dyn Request’ in redundant currently prevents that.

Required Methods§

source

fn send_request(&self, request_msg: CR) -> Box<dyn GetResponse + Send + Sync>

Request function that takes a ComposeRequest type.

Implementations on Foreign Types§

source§

impl<T: SendRequest<RequestMessage<Octs>> + ?Sized, Octs: Octets> SendRequest<RequestMessage<Octs>> for Box<T>

source§

fn send_request( &self, request_msg: RequestMessage<Octs>, ) -> Box<dyn GetResponse + Send + Sync>

Implementors§

source§

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

source§

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

source§

impl<Req> SendRequest<Req> for domain::net::client::multi_stream::Connection<Req>
where Req: ComposeRequest + Clone + 'static,

source§

impl<Req, ReqMulti> SendRequest<Req> for domain::net::client::stream::Connection<Req, ReqMulti>
where Req: ComposeRequest + 'static, ReqMulti: ComposeRequestMulti + Debug + Send + Sync + 'static,

source§

impl<Req: Clone + Debug + Send + Sync + 'static> SendRequest<Req> for domain::net::client::redundant::Connection<Req>

source§

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