pub enum ValidationDiagnostic {
Field {
id: String,
message: String,
},
Form {
fields: Vec<String>,
message: String,
},
}Expand description
One problem found while decoding and validating raw answers.
Diagnostics identify fields by stable occurrence path (for fields outside repeatable groups: the stable field ID) and describe the violated rule; they never echo the submitted value, since answers may be sensitive. Independent diagnostics accumulate: a batch submission reports everything actionable in one pass.
Variants§
Field
One field occurrence — or one repeatable group’s occurrence count —
violates the definition: a missing required answer, a populated
inactive field, a failed kind conversion, a constraint violation, a
rejected validator, or an occurrence count outside the declared
bounds. message describes the violated rule without echoing the
submitted value.
Fields
Form
An application whole-form rule was violated.
Trait Implementations§
Source§impl Clone for ValidationDiagnostic
impl Clone for ValidationDiagnostic
Source§fn clone(&self) -> ValidationDiagnostic
fn clone(&self) -> ValidationDiagnostic
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ValidationDiagnostic
impl Debug for ValidationDiagnostic
Source§impl Display for ValidationDiagnostic
impl Display for ValidationDiagnostic
impl Eq for ValidationDiagnostic
Source§impl Error for ValidationDiagnostic
impl Error for ValidationDiagnostic
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ValidationDiagnostic
impl PartialEq for ValidationDiagnostic
impl StructuralPartialEq for ValidationDiagnostic
Auto Trait Implementations§
impl Freeze for ValidationDiagnostic
impl RefUnwindSafe for ValidationDiagnostic
impl Send for ValidationDiagnostic
impl Sync for ValidationDiagnostic
impl Unpin for ValidationDiagnostic
impl UnsafeUnpin for ValidationDiagnostic
impl UnwindSafe for ValidationDiagnostic
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more