pub enum SchemaError {
Schema(String),
FieldType(String),
FieldValue(String),
FieldName(String),
Validation(String),
Serialization(String),
}Expand description
Errors produced when building, validating or (de)serializing a schema, a field entry, or a field value.
Variants§
Schema(String)
The schema definition itself is invalid — for example a duplicate field name, an out-of-range index, or an incompatible upgrade.
FieldType(String)
A FieldType declaration is malformed (e.g. an unsupported nested
type, an invalid Map key type, …).
FieldValue(String)
A FieldValue does not satisfy its declared FieldType.
FieldName(String)
A field name violates the rules enforced by
validate_field_name.
Validation(String)
A document fails schema validation — usually because a required field is missing or because a field appears that the schema does not declare.
Serialization(String)
CBOR or serde (de)serialization failed.
Trait Implementations§
Source§impl Debug for SchemaError
impl Debug for SchemaError
Source§impl Display for SchemaError
impl Display for SchemaError
Source§impl Error for SchemaError
impl Error for SchemaError
1.30.0 · 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 Freeze for SchemaError
impl RefUnwindSafe for SchemaError
impl Send for SchemaError
impl Sync for SchemaError
impl Unpin for SchemaError
impl UnsafeUnpin for SchemaError
impl UnwindSafe for SchemaError
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