[−][src]Trait httptest::responders::Responder
Respond with an HTTP response.
Required methods
fn respond<'a>(
&mut self,
req: &'a Request<Bytes>
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'a>>
&mut self,
req: &'a Request<Bytes>
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'a>>
Return a future that outputs an HTTP response.
Implementations on Foreign Types
impl<B> Responder for Response<B> where
B: Clone + Into<Body> + Send + Debug,
[src]
B: Clone + Into<Body> + Send + Debug,
fn respond<'a>(
&mut self,
_req: &'a Request<Bytes>
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'a>>
[src]
&mut self,
_req: &'a Request<Bytes>
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'a>>
Implementors
impl Responder for Cycle
[src]
fn respond<'a>(
&mut self,
req: &'a Request<Bytes>
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'a>>
[src]
&mut self,
req: &'a Request<Bytes>
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'a>>
impl<B> Responder for ResponseBuilder<B> where
B: Clone + Into<Body> + Send + Debug,
[src]
B: Clone + Into<Body> + Send + Debug,
fn respond<'a>(
&mut self,
req: &'a Request<Bytes>
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'a>>
[src]
&mut self,
req: &'a Request<Bytes>
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'a>>
impl<F, B> Responder for F where
F: FnMut() -> B + Clone + Send + 'static,
B: Responder,
[src]
F: FnMut() -> B + Clone + Send + 'static,
B: Responder,
Respond with the response returned from the provided function.