pub enum PostFieldError {
IoError(IoError),
MissingField,
WrongFieldType,
UnexpectedMultipleValues,
WrongDataTypeInt(ParseIntError),
WrongDataTypeFloat(ParseFloatError),
}
Expand description
Error returned by the methods of the DecodePostField
trait.
Variants
IoError(IoError)
Could not read the body. Usually happens with files.
MissingField
A field is missing from the received data.
WrongFieldType
Expected a file but got a field, or vice versa.
UnexpectedMultipleValues
Got multiple values for the same field while only one was expected.
WrongDataTypeInt(ParseIntError)
Failed to parse an integer field.
WrongDataTypeFloat(ParseFloatError)
Failed to parse a floating-point field.
Trait Implementations
sourceimpl Debug for PostFieldError
impl Debug for PostFieldError
sourceimpl Display for PostFieldError
impl Display for PostFieldError
sourceimpl Error for PostFieldError
impl Error for PostFieldError
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
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<Error> for PostFieldError
impl From<Error> for PostFieldError
sourcefn from(err: IoError) -> PostFieldError
fn from(err: IoError) -> PostFieldError
Converts to this type from the input type.
sourceimpl From<ParseFloatError> for PostFieldError
impl From<ParseFloatError> for PostFieldError
sourcefn from(err: ParseFloatError) -> PostFieldError
fn from(err: ParseFloatError) -> PostFieldError
Converts to this type from the input type.
sourceimpl From<ParseIntError> for PostFieldError
impl From<ParseIntError> for PostFieldError
sourcefn from(err: ParseIntError) -> PostFieldError
fn from(err: ParseIntError) -> PostFieldError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for PostFieldError
impl Send for PostFieldError
impl Sync for PostFieldError
impl Unpin for PostFieldError
impl !UnwindSafe for PostFieldError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more