Enum rocket::request::FormParseError
source · 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.