Enum FormRejection

#[non_exhaustive]
pub enum FormRejection

Rejection used for Form.

Contains one variant for each way the Form extractor can fail.

Variants

InvalidFormContentType(InvalidFormContentType)
FailedToDeserializeForm(FailedToDeserializeForm)
FailedToDeserializeFormBody(FailedToDeserializeFormBody)
BytesRejection(BytesRejection)

Implementations

impl FormRejection

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 FormRejection

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

impl Display for FormRejection

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

impl Error for FormRejection

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

impl From<BytesRejection> for FormRejection

fn from(inner: BytesRejection) -> Self

impl From<FailedToDeserializeForm> for FormRejection

fn from(inner: FailedToDeserializeForm) -> Self

impl From<FailedToDeserializeFormBody> for FormRejection

fn from(inner: FailedToDeserializeFormBody) -> Self

impl From<InvalidFormContentType> for FormRejection

fn from(inner: InvalidFormContentType) -> Self

impl IntoResponse for FormRejection

fn into_response(self) -> Response

Auto Trait Implementations

impl !RefUnwindSafe for FormRejection

impl !UnwindSafe for FormRejection

impl Freeze for FormRejection

impl Send for FormRejection

impl Sync for FormRejection

impl Unpin for FormRejection

impl UnsafeUnpin for FormRejection

Blanket Implementations

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

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

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for FormRejection

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for FormRejection

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

impl<T> Same for FormRejection

type Output = T;

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

fn to_string(&self) -> String

impl<T> WithSubscriber for FormRejection

impl<T, U> Into<U> for FormRejection 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 FormRejection where U: Into<T>,

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

impl<T, U> TryInto<U> for FormRejection 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 FormRejection where V: MultiLane<T>,

fn vzip(self) -> V