[−][src]Struct jsl::validator::ValidationError
Contains a single problem with an instance when evaluated against a schema.
Note that, despite its name, ValidationError
is not an error in the usual
Rust sense. It is an ordinary struct, which happens to contain information
about why some data was unsatisfactory against a given schema.
ValidationError
uses Cow
instead of String
to store its components.
That's because this crate makes every effort to never copy data out of your
instances. However, some parts of error paths require allocation (such as
when the usize
indices of an array are converted into String
), and so
Cow
is used.
Methods
impl<'a> ValidationError<'a>
[src]
pub fn new(
instance_path: JsonPointer<Cow<'a, str>, Vec<Cow<'a, str>>>,
schema_path: JsonPointer<Cow<'a, str>, Vec<Cow<'a, str>>>
) -> ValidationError<'a>
[src]
instance_path: JsonPointer<Cow<'a, str>, Vec<Cow<'a, str>>>,
schema_path: JsonPointer<Cow<'a, str>, Vec<Cow<'a, str>>>
) -> ValidationError<'a>
pub fn instance_path(&self) -> &JsonPointer<Cow<'a, str>, Vec<Cow<'a, str>>>
[src]
A pointer into the part of the instance (input) which was rejected.
pub fn schema_path(&self) -> &JsonPointer<Cow<'a, str>, Vec<Cow<'a, str>>>
[src]
A pointer into the part of the schema which rejected the instance.
Trait Implementations
impl<'a> Clone for ValidationError<'a>
[src]
fn clone(&self) -> ValidationError<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> PartialEq<ValidationError<'a>> for ValidationError<'a>
[src]
fn eq(&self, other: &ValidationError<'a>) -> bool
[src]
fn ne(&self, other: &ValidationError<'a>) -> bool
[src]
impl<'a> Eq for ValidationError<'a>
[src]
impl<'a> Debug for ValidationError<'a>
[src]
Auto Trait Implementations
impl<'a> Send for ValidationError<'a>
impl<'a> Sync for ValidationError<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,