pub enum ValidationKind {
UnexpectedElement,
UnexpectedAttribute,
MissingRequiredElement,
MissingRequiredAttribute,
TypeMismatch,
FacetViolation,
KeyNotUnique,
KeyRefDangling,
SubstitutionMismatch,
NillableViolation,
AssertionViolation,
Other,
}Expand description
Categorical tag for a validation issue. Use for programmatic dispatch rather than string-matching the message.
Variants§
UnexpectedElement
UnexpectedAttribute
MissingRequiredElement
MissingRequiredAttribute
TypeMismatch
Lexical value doesn’t match its declared type.
FacetViolation
Value parses but a facet (pattern, enumeration, length, range, …) rejects it.
KeyNotUnique
xs:key-declared value appears more than once in scope.
KeyRefDangling
xs:keyref references a key value that doesn’t exist.
SubstitutionMismatch
An element is in a substitution group but isn’t substitutable for the expected head (incompatible type).
NillableViolation
xsi:nil="true" on a non-nillable element, or with content.
AssertionViolation
XSD 1.1 xs:assert / xs:assertion evaluated to false
against the instance. cvc-assertion.
Other
Trait Implementations§
Source§impl Clone for ValidationKind
impl Clone for ValidationKind
Source§fn clone(&self) -> ValidationKind
fn clone(&self) -> ValidationKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ValidationKind
Source§impl Debug for ValidationKind
impl Debug for ValidationKind
impl Eq for ValidationKind
Source§impl PartialEq for ValidationKind
impl PartialEq for ValidationKind
Source§fn eq(&self, other: &ValidationKind) -> bool
fn eq(&self, other: &ValidationKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ValidationKind
Auto Trait Implementations§
impl Freeze for ValidationKind
impl RefUnwindSafe for ValidationKind
impl Send for ValidationKind
impl Sync for ValidationKind
impl Unpin for ValidationKind
impl UnsafeUnpin for ValidationKind
impl UnwindSafe for ValidationKind
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