pub struct ValidationError {
pub path: String,
pub field: String,
pub rule: String,
pub message: String,
pub value: Value,
}Expand description
A single validation error (JS ValidationError: path/field/rule/message/value).
Fields§
§path: StringDot-joined absolute path to the field (items.1.code, rows.__a__.v).
field: StringThe path’s last segment.
rule: StringThe failed rule’s name (verbatim — pattern/match aliases distinct).
message: StringThe display message (override → default with {0}/{1} → fallback).
value: ValueThe failing value (the whole array for an array-level rule).
Implementations§
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl PartialEq for ValidationError
impl PartialEq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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