pub enum PostError {
WrongContentType,
BodyAlreadyExtracted,
IoError(Error),
NotUtf8(String),
Field {
field: Cow<'static, str>,
error: PostFieldError,
},
}
Expand description
Error that can happen when decoding POST data.
Variants§
WrongContentType
The Content-Type
header of the request indicates that it doesn’t contain POST data.
BodyAlreadyExtracted
Can’t parse the body of the request because it was already extracted.
IoError(Error)
Could not read the body from the request.
NotUtf8(String)
Failed to parse a string field.
Field
There was an error with a particular field.
Trait Implementations§
Source§impl Error for PostError
impl Error for PostError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PostError
impl !RefUnwindSafe for PostError
impl Send for PostError
impl Sync for PostError
impl Unpin for PostError
impl !UnwindSafe for PostError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more