pub enum PostError {
WrongContentType,
BodyAlreadyExtracted,
IoError(IoError),
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(IoError)
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
sourceimpl Error for PostError
impl Error for PostError
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()
Auto Trait Implementations
impl !RefUnwindSafe for PostError
impl Send for PostError
impl Sync for PostError
impl Unpin for PostError
impl !UnwindSafe for PostError
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