pub struct ProblemResponse(pub Problem);Expand description
The axum IntoResponse wrapper around a transport-neutral Problem.
Problem itself is transport-free (it has no IntoResponse), so the HTTP edge
wraps it in this to render it: application/problem+json with the problem’s
status, mirroring the request_id into an x-request-id header. Extractors use
it as their Rejection, middleware return it, and the generated controller maps
a facade’s Problem error through it.
Tuple Fields§
§0: ProblemTrait Implementations§
Source§impl Clone for ProblemResponse
impl Clone for ProblemResponse
Source§impl Debug for ProblemResponse
impl Debug for ProblemResponse
Source§impl From<Problem> for ProblemResponse
impl From<Problem> for ProblemResponse
Source§impl IntoResponse for ProblemResponse
impl IntoResponse for ProblemResponse
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Forget for ProblemResponse
impl Freeze for ProblemResponse
impl Move for ProblemResponse
impl RefUnwindSafe for ProblemResponse
impl Send for ProblemResponse
impl Sync for ProblemResponse
impl Unpin for ProblemResponse
impl UnsafeUnpin for ProblemResponsewhere
*const str is !null: UnsafeUnpin,
PhantomData<str>: UnsafeUnpin,
NonZeroU16Inner: UnsafeUnpin,
impl UnwindSafe for ProblemResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, S> Handler<IntoResponseHandler, S> for T
impl<T, S> Handler<IntoResponseHandler, S> for T
Source§fn call(
self,
_req: Request<Body>,
_state: S,
) -> <T as Handler<IntoResponseHandler, S>>::Future
fn call( self, _req: Request<Body>, _state: S, ) -> <T as Handler<IntoResponseHandler, S>>::Future
Call the handler with the given request.
Source§fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
Apply a
tower::Layer to the handler. Read moreSource§fn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Convert the handler into a
Service by providing the stateSource§impl<H, T> HandlerWithoutStateExt<T> for H
impl<H, T> HandlerWithoutStateExt<T> for H
Source§fn into_service(self) -> HandlerService<H, T, ()>
fn into_service(self) -> HandlerService<H, T, ()>
Convert the handler into a
Service and no state.Source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
Convert the handler into a
MakeService and no state. Read moreSource§fn into_make_service_with_connect_info<C>(
self,
) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
fn into_make_service_with_connect_info<C>( self, ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
Convert the handler into a
MakeService which stores information
about the incoming connection and has no state. Read more