Enum gotham_formdata::Error[][src]

#[non_exhaustive]
pub enum Error<Err: Error + 'static> {
Show variants IllegalBody(Error), IllegalContentType(FromStrError), IllegalContentTypeValue(ToStrError), IllegalField(StringError), InvalidData(Err), IoError(Error), MissingBoundary, MissingContentType, MissingContentDisposition, MissingField(String), MultipartError(Error), UnknownContentType(Mime), UnknownField(String),
}
Expand description

This error type is used when parsing form data from a request body was unsuccessful.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IllegalBody(Error)

The body of the request could not be read.

IllegalContentType(FromStrError)

The content type of the body was not a valid mime type.

IllegalContentTypeValue(ToStrError)

The content type of the body contained unreadable bytes.

IllegalField(StringError)

The value of a field could not be parsed into that field’s type.

InvalidData(Err)

The body was parsed but contained data that did not pass validation.

IoError(Error)

An I/O error occured while reading the body.

MissingBoundary

The body was a multipart body but did not specify a boundary.

MissingContentType

The request did not specify a content type.

MissingContentDisposition

One of the multipart parts is missing a Content-Disposition header.

MissingField(String)

The body is missing a required field.

MultipartError(Error)

The multipart format was invalid.

UnknownContentType(Mime)

The body’s content type is not supported.

UnknownField(String)

The body contained a field that was not expected.

Trait Implementations

impl<E, T> ConvertFromStr<Error<E>> for T where
    E: Error,
    T: FromStr,
    T::Err: Into<Error>, 
[src]

fn convert_value<'a>(
    name: &'a str,
    value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
[src]

Perform the conversion.

impl<Err: Debug + Error + 'static> Debug for Error<Err>[src]

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

Formats the value using the given formatter. Read more

impl<Err: Error + 'static> Display for Error<Err>[src]

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<Err: Error + 'static> Error for Error<Err>[src]

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

The lower-level source of this error, if any. Read more

fn backtrace(&self) -> Option<&Backtrace>[src]

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

fn description(&self) -> &str1.0.0[src]

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

fn cause(&self) -> Option<&dyn Error>1.0.0[src]

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

impl<Err: Error + 'static> From<Error> for Error<Err>[src]

fn from(source: Error) -> Self[src]

Performs the conversion.

impl<Err: Error + 'static> From<Error> for Error<Err>[src]

fn from(source: Error) -> Self[src]

Performs the conversion.

impl<Err: Error + 'static> From<Error> for Error<Err>[src]

fn from(source: Error) -> Self[src]

Performs the conversion.

impl<Err: Error + 'static> From<FromStrError> for Error<Err>[src]

fn from(source: FromStrError) -> Self[src]

Performs the conversion.

impl<Err: Error + 'static> From<ToStrError> for Error<Err>[src]

fn from(source: ToStrError) -> Self[src]

Performs the conversion.

Auto Trait Implementations

impl<Err> !RefUnwindSafe for Error<Err>

impl<Err> Send for Error<Err> where
    Err: Send

impl<Err> Sync for Error<Err> where
    Err: Sync

impl<Err> Unpin for Error<Err> where
    Err: Unpin

impl<Err> !UnwindSafe for Error<Err>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<E, T> ConvertFromStr<Error<E>> for T where
    T: FromStr,
    E: Error,
    <T as FromStr>::Err: Into<Error>, 
[src]

pub fn convert_value(
    &'a str,
    Value<'a, Error<E>>
) -> Pin<Box<dyn Future<Output = Result<T, Error<E>>> + 'a + Send, Global>>
[src]

Perform the conversion.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V