pub struct Violation {
pub path: String,
pub constraint: &'static str,
pub detail: String,
}Expand description
One way in which a value did not match its schema.
Names the location and the constraint separately, because a repair loop acts on both: the path says where to edit, the constraint says what rule was broken.
Fields§
§path: StringA JSON Pointer into the instance, e.g. /items/2/name. The empty string
is the root.
constraint: &'static strThe schema keyword that was not satisfied, e.g. type, required.
detail: StringWhat was expected and what was found.
Implementations§
Trait Implementations§
impl Eq for Violation
impl StructuralPartialEq for Violation
Auto Trait Implementations§
impl Freeze for Violation
impl RefUnwindSafe for Violation
impl Send for Violation
impl Sync for Violation
impl Unpin for Violation
impl UnsafeUnpin for Violation
impl UnwindSafe for Violation
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