Struct JsonDataError

pub struct JsonDataError(/* private field */);

Rejection type for Json.

This rejection is used if the request body is syntactically valid JSON but couldn't be deserialized into the target type.

Implementations

impl JsonDataError

fn body_text(&self) -> String

Get the response body text used for this rejection.

fn status(&self) -> StatusCode

Get the status code used for this rejection.

Trait Implementations

impl Debug for JsonDataError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for JsonDataError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Error for JsonDataError

fn source(&self) -> Option<&dyn Error + 'static>

impl IntoResponse for JsonDataError

fn into_response(self) -> Response

Auto Trait Implementations

impl !RefUnwindSafe for JsonDataError

impl !UnwindSafe for JsonDataError

impl Freeze for JsonDataError

impl Send for JsonDataError

impl Sync for JsonDataError

impl Unpin for JsonDataError

impl UnsafeUnpin for JsonDataError

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for JsonDataError where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for JsonDataError where ST: ?Sized, DT: ?Sized,

impl<T> Any for JsonDataError where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for JsonDataError where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for JsonDataError where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for JsonDataError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for JsonDataError

impl<T> Read<Exclusive, BecauseExclusive> for JsonDataError where T: ?Sized,

impl<T> Same for JsonDataError

type Output = T;

impl<T> ToString for JsonDataError where T: Display + ?Sized,

fn to_string(&self) -> String

impl<T> WithSubscriber for JsonDataError

impl<T, U> Into<U> for JsonDataError where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for JsonDataError where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for JsonDataError where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip<V> for JsonDataError where V: MultiLane<T>,

fn vzip(self) -> V