pub type ErrorIterator<'a> = Box<dyn Iterator<Item = ValidationError<'a>> + Sync + Send + 'a>;
Expand description
An iterator over instances of ValidationError
that represent validation error for the
input instance.
§Examples
use serde_json::json;
let schema = json!({"maxLength": 5});
let instance = json!("foo");
if let Ok(validator) = jsonschema::validator_for(&schema) {
let errors = validator.iter_errors(&instance);
for error in errors {
println!("Validation error: {}", error)
}
}
Aliased Type§
pub struct ErrorIterator<'a>(/* private fields */);