HttpSendDyn

Trait HttpSendDyn 

Source
pub trait HttpSendDyn<RequestBody>
where RequestBody: Body + 'static,
{ type ResponseBody: Body + 'static; type Error: Error; // Required method fn send_dyn( &self, req: Request<RequestBody>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ResponseBody>, Self::Error>> + Send + '_>>; }
Expand description

HttpSendDyn is the dynamic version of HttpSend that can generate dynamic Futures.

Required Associated Types§

Required Methods§

Source

fn send_dyn( &self, req: Request<RequestBody>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ResponseBody>, Self::Error>> + Send + '_>>

Implementors§

Source§

impl<T, RequestBody> HttpSendDyn<RequestBody> for T
where RequestBody: Body + 'static, T: HttpSend<RequestBody>,

Source§

type ResponseBody = <T as HttpSend<RequestBody>>::ResponseBody

Source§

type Error = <T as HttpSend<RequestBody>>::Error