Enum gotham_formdata::Error
source · [−]#[non_exhaustive]
pub enum Error<Err: Error + 'static> {
Show 13 variants
IllegalBody(Error),
IllegalContentType(FromStrError),
IllegalContentTypeValue(ToStrError),
IllegalField(String, Error),
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
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(String, Error)
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
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
T::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
T::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<Err: Error + 'static> Error for Error<Err> where
Err: Error + 'static,
Self: Debug + Display,
impl<Err: Error + 'static> Error for Error<Err> where
Err: Error + 'static,
Self: Debug + Display,
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<Err: Error + 'static> From<FromStrError> for Error<Err>
impl<Err: Error + 'static> From<FromStrError> for Error<Err>
sourcefn from(source: FromStrError) -> Self
fn from(source: FromStrError) -> Self
Performs the conversion.
sourceimpl<Err: Error + 'static> From<ToStrError> for Error<Err>
impl<Err: Error + 'static> From<ToStrError> for Error<Err>
sourcefn from(source: ToStrError) -> Self
fn from(source: ToStrError) -> Self
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
impl<E, T> ConvertFromStr<Error<E>> for T where
E: Error,
T: FromStr,
<T as FromStr>::Err: Into<Error>,
sourcefn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
fn convert_value<'a>(
name: &'a str,
value: Value<'a, Error<E>>
) -> ConversionFuture<'a, Self, Error<E>>
Perform the conversion.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more