pub enum ValidatedJsonRejection {
Json(JsonRejection),
Validation(ValidationPipeError),
}Expand description
Rejection emitted by ValidatedJson.
Variants§
Json(JsonRejection)
The request body was not valid JSON for the target type.
Validation(ValidationPipeError)
The parsed JSON failed validation.
Trait Implementations§
Source§impl Debug for ValidatedJsonRejection
impl Debug for ValidatedJsonRejection
Source§impl Display for ValidatedJsonRejection
impl Display for ValidatedJsonRejection
Source§impl Error for ValidatedJsonRejection
impl Error for ValidatedJsonRejection
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<JsonRejection> for ValidatedJsonRejection
impl From<JsonRejection> for ValidatedJsonRejection
Source§fn from(source: JsonRejection) -> Self
fn from(source: JsonRejection) -> Self
Converts to this type from the input type.
Source§impl From<ValidationPipeError> for ValidatedJsonRejection
impl From<ValidationPipeError> for ValidatedJsonRejection
Source§fn from(source: ValidationPipeError) -> Self
fn from(source: ValidationPipeError) -> Self
Converts to this type from the input type.
Source§impl IntoResponse for ValidatedJsonRejection
impl IntoResponse for ValidatedJsonRejection
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl !RefUnwindSafe for ValidatedJsonRejection
impl !UnwindSafe for ValidatedJsonRejection
impl Freeze for ValidatedJsonRejection
impl Send for ValidatedJsonRejection
impl Sync for ValidatedJsonRejection
impl Unpin for ValidatedJsonRejection
impl UnsafeUnpin for ValidatedJsonRejection
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more