pub struct ValidationError<'s, 'v> {
pub schema_url: &'s str,
pub instance_location: InstanceLocation<'v>,
pub kind: ErrorKind<'s, 'v>,
pub causes: Vec<ValidationError<'s, 'v>>,
}Expand description
Error type for validation failures.
Fields§
§schema_url: &'s strThe absolute, dereferenced schema location.
instance_location: InstanceLocation<'v>The location of the JSON value within the instance being validated
kind: ErrorKind<'s, 'v>kind of error
causes: Vec<ValidationError<'s, 'v>>Holds nested errors
Implementations§
Source§impl<'s> ValidationError<'s, '_>
impl<'s> ValidationError<'s, '_>
Sourcepub fn flag_output(&self) -> FlagOutput
pub fn flag_output(&self) -> FlagOutput
The Flag output format, merely the boolean result.
Sourcepub fn basic_output(&self) -> OutputUnit<'_, '_, '_>
pub fn basic_output(&self) -> OutputUnit<'_, '_, '_>
The Basic structure, a flat list of output units.
Sourcepub fn detailed_output(&self) -> OutputUnit<'_, '_, '_>
pub fn detailed_output(&self) -> OutputUnit<'_, '_, '_>
The Detailed structure, based on the schema.
Trait Implementations§
Source§impl<'s, 'v> Debug for ValidationError<'s, 'v>
impl<'s, 'v> Debug for ValidationError<'s, 'v>
Source§impl Display for ValidationError<'_, '_>
impl Display for ValidationError<'_, '_>
Source§impl Error for ValidationError<'_, '_>
impl Error for ValidationError<'_, '_>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<'s, 'v> Freeze for ValidationError<'s, 'v>
impl<'s, 'v> !RefUnwindSafe for ValidationError<'s, 'v>
impl<'s, 'v> !Send for ValidationError<'s, 'v>
impl<'s, 'v> !Sync for ValidationError<'s, 'v>
impl<'s, 'v> Unpin for ValidationError<'s, 'v>
impl<'s, 'v> !UnwindSafe for ValidationError<'s, 'v>
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