pub struct FieldError {
pub key: String,
pub kind: FieldErrorKind,
pub message: String,
}Expand description
One key a submission was refused under, with the sentence the form renders beneath it.
The entry type of FieldErrors. Self::required is what
RecordForm::parse answers for an unanswered key, whose control supplies
the rendered wording.
Fields§
§key: StringThe form key the error renders under.
kind: FieldErrorKindWhy the key failed.
message: StringThe sentence the form shows.
Implementations§
Source§impl FieldError
impl FieldError
Sourcepub fn unanswered(key: impl Into<String>, message: impl Into<String>) -> Self
pub fn unanswered(key: impl Into<String>, message: impl Into<String>) -> Self
The submission left key unanswered — an empty field with no blank
answer, or a required group whose inputs were all empty; message is
the wording its control renders in the slot.
Trait Implementations§
Source§impl Clone for FieldError
impl Clone for FieldError
Source§impl Debug for FieldError
impl Debug for FieldError
impl Eq for FieldError
Source§impl PartialEq for FieldError
impl PartialEq for FieldError
impl StructuralPartialEq for FieldError
Auto Trait Implementations§
impl Freeze for FieldError
impl RefUnwindSafe for FieldError
impl Send for FieldError
impl Sync for FieldError
impl Unpin for FieldError
impl UnsafeUnpin for FieldError
impl UnwindSafe for FieldError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
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.