pub enum JsonRejection {
Body(Error),
Deserialize(DeserializeError),
MissingContentType,
InvalidContentType,
}Variants§
Body(Error)
Failed to read the request body.
Deserialize(DeserializeError)
Failed to deserialize the JSON data.
MissingContentType
Missing Content-Type: application/json header.
InvalidContentType
Invalid Content-Type header (not application/json).
Trait Implementations§
Source§impl Debug for JsonRejection
impl Debug for JsonRejection
Source§impl Display for JsonRejection
impl Display for JsonRejection
Source§impl ResponseError for JsonRejection
impl ResponseError for JsonRejection
Source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns appropriate status code for error. Read more
Source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Creates full response for error. Read more
Auto Trait Implementations§
impl Freeze for JsonRejection
impl !RefUnwindSafe for JsonRejection
impl !Send for JsonRejection
impl !Sync for JsonRejection
impl Unpin for JsonRejection
impl UnsafeUnpin for JsonRejection
impl !UnwindSafe for JsonRejection
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