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
sourceimpl<'f> Clone for FormParseError<'f>
impl<'f> Clone for FormParseError<'f>
sourcefn clone(&self) -> FormParseError<'f>
fn clone(&self) -> FormParseError<'f>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'f> Debug for FormParseError<'f>
impl<'f> Debug for FormParseError<'f>
sourceimpl<'f> Hash for FormParseError<'f>
impl<'f> Hash for FormParseError<'f>
sourceimpl<'f> PartialEq<FormParseError<'f>> for FormParseError<'f>
impl<'f> PartialEq<FormParseError<'f>> for FormParseError<'f>
sourcefn eq(&self, other: &FormParseError<'f>) -> bool
fn eq(&self, other: &FormParseError<'f>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FormParseError<'f>) -> bool
fn ne(&self, other: &FormParseError<'f>) -> bool
This method tests for !=
.
impl<'f> Copy for FormParseError<'f>
impl<'f> Eq for FormParseError<'f>
impl<'f> StructuralEq for FormParseError<'f>
impl<'f> StructuralPartialEq for FormParseError<'f>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
sourcefn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
F: FnMut(T) -> U,
A: Array<Item = U>,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more