pub enum JsonValidationError {
InvalidJson(JsonParseError),
DepthExceeded(SchemaEvaluationDepthError),
}Expand description
Why JSON text could not be validated, as Validator::validate_json and Validator::evaluate_json report it.
Validator::try_validate_json and Validator::try_evaluate_json report a SchemaEvaluationError, which
also tells a match of a regular expression that reached its limit from the maximum depth.
Variants§
InvalidJson(JsonParseError)
The text is not valid JSON.
DepthExceeded(SchemaEvaluationDepthError)
The validation was abandoned at a limit: it recursed in place beyond the maximum depth, or a match of a
regular expression reached its limit. The name is from when the depth was the one limit, and the message
names both (see [without_the_limit] for why the two are one here).
Trait Implementations§
Source§impl Clone for JsonValidationError
impl Clone for JsonValidationError
Source§impl Debug for JsonValidationError
impl Debug for JsonValidationError
Source§impl Display for JsonValidationError
impl Display for JsonValidationError
impl Eq for JsonValidationError
Source§impl Error for JsonValidationError
impl Error for JsonValidationError
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()
Source§impl PartialEq for JsonValidationError
impl PartialEq for JsonValidationError
impl StructuralPartialEq for JsonValidationError
Auto Trait Implementations§
impl Freeze for JsonValidationError
impl RefUnwindSafe for JsonValidationError
impl Send for JsonValidationError
impl Sync for JsonValidationError
impl Unpin for JsonValidationError
impl UnsafeUnpin for JsonValidationError
impl UnwindSafe for JsonValidationError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.