pub struct Json<T>(pub T);
Expand description
JSON Extractor / Response.
This is the customized axum::extract::Json
version to respose error with ErrResp
.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<S, T> FromRequest<S> for Json<T>
impl<S, T> FromRequest<S> for Json<T>
Source§impl<T> IntoResponse for Json<T>where
T: Serialize,
impl<T> IntoResponse for Json<T>where
T: Serialize,
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl<T> Freeze for Json<T>where
T: Freeze,
impl<T> RefUnwindSafe for Json<T>where
T: RefUnwindSafe,
impl<T> Send for Json<T>where
T: Send,
impl<T> Sync for Json<T>where
T: Sync,
impl<T> Unpin for Json<T>where
T: Unpin,
impl<T> UnwindSafe for Json<T>where
T: UnwindSafe,
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