pub enum ValidatorError {
UndefinedTypeReference {
name: String,
},
InvalidVariantTag {
tag: String,
reason: String,
},
ConflictingVariantTags {
explicit: String,
repr: String,
},
CrossSchemaReference {
namespace: String,
name: String,
},
DocumentParseError(ParseError),
InnerErrorsPropagated,
}Expand description
Internal validator errors that cause immediate failure.
These represent problems with the validator itself or invalid inputs, not type mismatches in the document being validated.
Variants§
UndefinedTypeReference
Undefined type reference in schema
InvalidVariantTag
Invalid variant tag (parse error)
ConflictingVariantTags
Conflicting variant tags between $variant and repr
CrossSchemaReference
Cross-schema reference not supported
DocumentParseError(ParseError)
Parse error (from eure-document)
InnerErrorsPropagated
Inner validation errors were already propagated (no additional error needed)
Implementations§
Source§impl ValidatorError
impl ValidatorError
Sourcepub fn as_parse_error(&self) -> Option<&ParseError>
pub fn as_parse_error(&self) -> Option<&ParseError>
Get the underlying ParseError if this is a DocumentParseError variant.
Trait Implementations§
Source§impl Clone for ValidatorError
impl Clone for ValidatorError
Source§fn clone(&self) -> ValidatorError
fn clone(&self) -> ValidatorError
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 ValidatorError
impl Debug for ValidatorError
Source§impl Display for ValidatorError
impl Display for ValidatorError
Source§impl Error for ValidatorError
impl Error for ValidatorError
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 From<ParseError> for ValidatorError
impl From<ParseError> for ValidatorError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ValidatorError
impl PartialEq for ValidatorError
impl StructuralPartialEq for ValidatorError
Auto Trait Implementations§
impl Freeze for ValidatorError
impl RefUnwindSafe for ValidatorError
impl Send for ValidatorError
impl Sync for ValidatorError
impl Unpin for ValidatorError
impl UnwindSafe for ValidatorError
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