pub enum ValidationErrorKind {
TypeNotAllowed {
found_type: ScalarType,
allowed_types: Vec<ScalarType>,
},
CustomConstraintFailed {
constraint_name: String,
actual_value: String,
},
CoercionFailed {
from_type: ScalarType,
to_types: Vec<ScalarType>,
},
}Expand description
Specific type of validation error that occurred
Variants§
TypeNotAllowed
A scalar type is not allowed in the current schema
Fields
§
found_type: ScalarTypeThe scalar type that was found
§
allowed_types: Vec<ScalarType>The types that are allowed in this schema
CustomConstraintFailed
Custom validation constraint failed
Fields
CoercionFailed
Type coercion failed
Fields
§
from_type: ScalarTypeThe type that was found
§
to_types: Vec<ScalarType>The types that coercion was attempted to
Trait Implementations§
Source§impl Clone for ValidationErrorKind
impl Clone for ValidationErrorKind
Source§fn clone(&self) -> ValidationErrorKind
fn clone(&self) -> ValidationErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationErrorKind
impl Debug for ValidationErrorKind
Source§impl PartialEq for ValidationErrorKind
impl PartialEq for ValidationErrorKind
impl Eq for ValidationErrorKind
impl StructuralPartialEq for ValidationErrorKind
Auto Trait Implementations§
impl Freeze for ValidationErrorKind
impl RefUnwindSafe for ValidationErrorKind
impl Send for ValidationErrorKind
impl Sync for ValidationErrorKind
impl Unpin for ValidationErrorKind
impl UnsafeUnpin for ValidationErrorKind
impl UnwindSafe for ValidationErrorKind
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