Add response::ErrorResponse and response::Result (#921)

* feat: add response::{Error, Result}

This type makes for efficient use of the `?` operator when in a function
with multiple return error types that all implement `IntoResponse`.

Signed-off-by: Nathaniel McCallum <[email protected]>

* misc adjustments from PR review

* Rename to `ErrorResponse` and `ResultResponse`

* nitpicky docs changes

* update changelog

* changelog wording

* Apply suggestions from code review

Co-authored-by: Jonas Platte <[email protected]>

Co-authored-by: David Pedersen <[email protected]>
Co-authored-by: Jonas Platte <[email protected]>
This commit is contained in:
Nathaniel McCallum
2022-04-21 16:24:29 +02:00
committed by GitHub
co-authored by Jonas Platte David Pedersen
parent ec38c438e0
commit 8084b242d5
4 changed files with 117 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ pub use crate::Extension;
#[doc(inline)]
pub use axum_core::response::{
AppendHeaders, IntoResponse, IntoResponseParts, Response, ResponseParts,
AppendHeaders, ErrorResponse, IntoResponse, IntoResponseParts, Response, ResponseParts, Result,
};
#[doc(inline)]