Trait fishrock_lambda_http::IntoResponse[][src]

pub trait IntoResponse {
    fn into_response(self) -> Response<Body>;
}
Expand description

A conversion of self into a Response<Body> for various types.

Implementations for Response<B> where B: Into<Body>, B where B: Into<Body> and serde_json::Value are provided by default.

Example

use lambda_http::{Body, IntoResponse, Response};

assert_eq!(
  "hello".into_response().body(),
  Response::new(Body::from("hello")).body()
);

Required methods

fn into_response(self) -> Response<Body>[src]

Return a translation of self into a Response<Body>

Implementations on Foreign Types

impl IntoResponse for Value[src]

Implementors

impl<B> IntoResponse for Response<B> where
    B: Into<Body>, 
[src]

impl<B> IntoResponse for B where
    B: Into<Body>, 
[src]