#[non_exhaustive]pub enum SchemaViolationCode {
Show 13 variants
UnknownRoot,
UnexpectedElement,
MissingRequiredChild,
TooManyOccurrences,
OutOfOrderChild,
MissingChoiceBranch,
MissingRequiredAttribute,
UnknownAttribute,
InvalidLexicalValue,
InvalidEnumerationValue,
PatternMismatch,
UnexpectedText,
ForeignNamespace,
}Expand description
A stable category for a schema-validation failure.
Codes are part of the public contract: callers match on them rather than parsing messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownRoot
The root element is not a global root declared by the schema.
UnexpectedElement
An element appeared where the schema does not declare it.
MissingRequiredChild
A required child occurred fewer times than minOccurs.
TooManyOccurrences
A child occurred more times than maxOccurs.
OutOfOrderChild
Children appeared in an order the declared sequence does not permit.
MissingChoiceBranch
A required choice branch was absent.
MissingRequiredAttribute
A required attribute was absent.
UnknownAttribute
An attribute is not declared on this element.
InvalidLexicalValue
A value is outside its datatype’s lexical space.
InvalidEnumerationValue
A value is not a member of the declared enumeration.
PatternMismatch
A value does not satisfy the declared pattern facet.
UnexpectedText
Character data appeared in element-only content.
ForeignNamespace
An element is in a namespace the schema does not define.
Trait Implementations§
Source§impl Clone for SchemaViolationCode
impl Clone for SchemaViolationCode
Source§fn clone(&self) -> SchemaViolationCode
fn clone(&self) -> SchemaViolationCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more