Enum jtd::ValidateError [−][src]
Errors that may arise from validate()
.
Variants
The maximum depth, as specified by ValidateOptions::with_max_depth
,
was exceeded.
use serde_json::json; use jtd::{Schema, ValidateError, ValidateOptions}; let schema = Schema::from_serde_schema( serde_json::from_value(json!({ "definitions": { "loop": { "ref": "loop" }, }, "ref": "loop", })) .unwrap(), ) .unwrap(); assert_eq!( ValidateError::MaxDepthExceeded, jtd::validate( &schema, &json!(null), ValidateOptions::new().with_max_depth(3) ) .unwrap_err() )
Trait Implementations
impl Clone for ValidateError
[src]
fn clone(&self) -> ValidateError
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ValidateError
[src]
impl Display for ValidateError
[src]
impl Eq for ValidateError
[src]
impl Error for ValidateError
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl PartialEq<ValidateError> for ValidateError
[src]
fn eq(&self, other: &ValidateError) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ValidateError
[src]
impl StructuralPartialEq for ValidateError
[src]
Auto Trait Implementations
impl RefUnwindSafe for ValidateError
[src]
impl Send for ValidateError
[src]
impl Sync for ValidateError
[src]
impl Unpin for ValidateError
[src]
impl UnwindSafe for ValidateError
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,