pub enum SchemaErrorKind<'a> {
WrongType {
expected: &'static str,
actual: &'a str,
},
MalformedField {
error: String,
},
FieldMissing {
field: &'a str,
},
ExtraField {
field: &'a str,
},
UnknownType {
unknown_type: &'a str,
},
Multiple {
errors: Vec<SchemaError<'a>>,
},
}Variants§
WrongType
MalformedField
FieldMissing
ExtraField
UnknownType
Multiple
Fields
§
errors: Vec<SchemaError<'a>>Implementations§
Source§impl<'a> SchemaErrorKind<'a>
impl<'a> SchemaErrorKind<'a>
pub fn with_path( self, path: SmallVec<[BreadcrumbSegment<'a>; 8]>, ) -> SchemaError<'a>
pub fn with_path_name(self, path: &'a str) -> SchemaError<'a>
pub fn with_path_index(self, index: usize) -> SchemaError<'a>
Trait Implementations§
Source§impl<'a> Debug for SchemaErrorKind<'a>
impl<'a> Debug for SchemaErrorKind<'a>
Source§impl<'a> Display for SchemaErrorKind<'a>
impl<'a> Display for SchemaErrorKind<'a>
Source§impl<'a> Error for SchemaErrorKind<'a>
impl<'a> Error for SchemaErrorKind<'a>
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()
Source§impl<'a> From<SchemaErrorKind<'a>> for SchemaError<'a>
impl<'a> From<SchemaErrorKind<'a>> for SchemaError<'a>
Source§fn from(kind: SchemaErrorKind<'a>) -> SchemaError<'a>
fn from(kind: SchemaErrorKind<'a>) -> SchemaError<'a>
Converts to this type from the input type.
Source§impl<'a> PartialEq for SchemaErrorKind<'a>
impl<'a> PartialEq for SchemaErrorKind<'a>
impl<'a> Eq for SchemaErrorKind<'a>
impl<'a> StructuralPartialEq for SchemaErrorKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for SchemaErrorKind<'a>
impl<'a> RefUnwindSafe for SchemaErrorKind<'a>
impl<'a> Send for SchemaErrorKind<'a>
impl<'a> Sync for SchemaErrorKind<'a>
impl<'a> Unpin for SchemaErrorKind<'a>
impl<'a> UnwindSafe for SchemaErrorKind<'a>
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