pub enum FormParseError<'f> {
BadValue(&'f RawStr, &'f RawStr),
Unknown(&'f RawStr, &'f RawStr),
Missing(&'f RawStr),
}
Expand description
Error returned by the FromForm
derive on form
parsing errors.
If multiple errors occur while parsing a form, the first error in the following precedence, from highest to lowest, is returned:
BadValue
orUnknown
in incoming form string field orderMissing
in lexical field order
Variants§
BadValue(&'f RawStr, &'f RawStr)
The field named .0
with value .1
failed to parse or validate.
Unknown(&'f RawStr, &'f RawStr)
The parse was strict and the field named .0
with value .1
appeared
in the incoming form string but was unexpected.
This error cannot occur when parsing is lenient.
Missing(&'f RawStr)
The field named .0
was expected but is missing in the incoming form.
Trait Implementations§
Source§impl<'f> Clone for FormParseError<'f>
impl<'f> Clone for FormParseError<'f>
Source§fn clone(&self) -> FormParseError<'f>
fn clone(&self) -> FormParseError<'f>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'f> Debug for FormParseError<'f>
impl<'f> Debug for FormParseError<'f>
Source§impl<'f> Hash for FormParseError<'f>
impl<'f> Hash for FormParseError<'f>
Source§impl<'f> PartialEq for FormParseError<'f>
impl<'f> PartialEq for FormParseError<'f>
impl<'f> Copy for FormParseError<'f>
impl<'f> Eq for FormParseError<'f>
impl<'f> StructuralPartialEq for FormParseError<'f>
Auto Trait Implementations§
impl<'f> Freeze for FormParseError<'f>
impl<'f> RefUnwindSafe for FormParseError<'f>
impl<'f> Send for FormParseError<'f>
impl<'f> Sync for FormParseError<'f>
impl<'f> Unpin for FormParseError<'f>
impl<'f> UnwindSafe for FormParseError<'f>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.