pub enum SchemaValidationError {
InvalidJson {
source: Error,
},
InvalidSchema {
message: String,
},
Mismatch {
message: String,
},
NotObjectSchema,
EmptyFieldName,
InvalidProperties,
InvalidRequired,
PayloadNotObject,
Serialize {
source: Error,
},
}Expand description
Errors returned while compiling schemas, validating payloads, or evolving schemas.
Variants§
InvalidJson
The payload was not syntactically valid JSON.
InvalidSchema
The JSON Schema definition could not be compiled.
Mismatch
The payload did not satisfy the JSON Schema definition.
NotObjectSchema
Schema evolution can only add fields to object schemas.
EmptyFieldName
Schema evolution field names must be non-empty.
InvalidProperties
The schema’s properties member was not an object.
InvalidRequired
The schema’s required member was not an array of strings.
PayloadNotObject
The payload cannot receive object-field defaults because it is not an object.
Serialize
The normalized JSON payload could not be serialized for delivery.
Trait Implementations§
Source§impl Debug for SchemaValidationError
impl Debug for SchemaValidationError
Source§impl Display for SchemaValidationError
impl Display for SchemaValidationError
Source§impl Error for SchemaValidationError
impl Error for SchemaValidationError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SchemaValidationError
impl !UnwindSafe for SchemaValidationError
impl Freeze for SchemaValidationError
impl Send for SchemaValidationError
impl Sync for SchemaValidationError
impl Unpin for SchemaValidationError
impl UnsafeUnpin for SchemaValidationError
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