Enum JsonRejection
enum JsonRejection
Rejection used for Json.
Contains one variant for each way the Json extractor
can fail.
Variants
-
JsonDataError(JsonDataError) -
JsonSyntaxError(JsonSyntaxError) -
MissingJsonContentType(MissingJsonContentType) -
BytesRejection(BytesRejection)
Implementations
impl JsonRejection
fn body_text(self: &Self) -> StringGet the response body text used for this rejection.
fn status(self: &Self) -> http::StatusCodeGet the status code used for this rejection.
impl Debug for JsonRejection
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Display for JsonRejection
fn fmt(self: &Self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
impl Error for JsonRejection
fn source(self: &Self) -> Option<&dyn std::error::Error + 'static>
impl Freeze for JsonRejection
impl From for JsonRejection
fn from(inner: MissingJsonContentType) -> Self
impl From for JsonRejection
fn from(inner: JsonSyntaxError) -> Self
impl From for JsonRejection
fn from(inner: JsonDataError) -> Self
impl From for JsonRejection
fn from(inner: BytesRejection) -> Self
impl IntoResponse for JsonRejection
fn into_response(self: Self) -> $crate::response::Response
impl RefUnwindSafe for JsonRejection
impl Send for JsonRejection
impl Sync for JsonRejection
impl Unpin for JsonRejection
impl UnwindSafe for JsonRejection
impl<T> Any for JsonRejection
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for JsonRejection
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for JsonRejection
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for JsonRejection
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for JsonRejection
impl<T> Same for JsonRejection
impl<T> ToString for JsonRejection
fn to_string(self: &Self) -> String
impl<T> WithSubscriber for JsonRejection
impl<T, U> Into for JsonRejection
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for JsonRejection
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for JsonRejection
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip for JsonRejection
fn vzip(self: Self) -> V