Skip to main content

SendRequest

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

Dyn Compatibility§

This trait is dyn compatible.

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

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<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, 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 + ComposeRequest + Debug + Send + Sync + 'static> SendRequest<Req> for domain::net::client::load_balancer::Connection<Req>

Source§

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

Source§

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

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,