Trait xitca_web::http::IntoResponse
source · pub trait IntoResponse<B, ResB> {
// Required method
fn into_response(self, body: B) -> Response<ResB>;
// Provided method
fn as_response(&mut self, body: B) -> Response<ResB>
where Self: Default { ... }
}Expand description
Helper trait for convert a Request to Response. This is for re-use request’s heap allocation and pass down the context data inside Extensions