pub struct ValidationFailure {
pub kind: ValidationErrorKind,
pub instance_path: Location,
pub schema_path: Location,
}Expand description
A validation error bundled with instance and schema paths.
WHY: Programmatic access to the error kind and paths without parsing
Display output or traversing ErrorTrace frames.
WHAT: A simple struct holding the error kind plus both paths.
HOW: Created via to_failure() which extracts paths from ErrorTrace
frames.
Fields§
§kind: ValidationErrorKindThe category of validation failure.
instance_path: LocationJSON Pointer path to the failing value in the instance.
schema_path: LocationJSON Pointer path to the failing keyword in the schema.
Trait Implementations§
Source§impl Clone for ValidationFailure
impl Clone for ValidationFailure
Source§fn clone(&self) -> ValidationFailure
fn clone(&self) -> ValidationFailure
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 moreAuto Trait Implementations§
impl Freeze for ValidationFailure
impl RefUnwindSafe for ValidationFailure
impl Send for ValidationFailure
impl Sync for ValidationFailure
impl Unpin for ValidationFailure
impl UnsafeUnpin for ValidationFailure
impl UnwindSafe for ValidationFailure
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