pub enum ViolationKind {
Show 14 variants
Undeclared {
element: String,
},
Missing {
element: String,
},
TooFew {
element: String,
min: u32,
found: usize,
},
TooMany {
element: String,
max: u32,
found: usize,
},
NoAlternative {
alternatives: Vec<String>,
},
ManyAlternatives {
taken: Vec<String>,
},
AbstractType {
type_name: String,
},
UnusableType {
type_name: String,
reason: String,
},
TooDeep,
NotEnumerated {
value: String,
allowed: Vec<String>,
total: usize,
},
Length {
value: String,
len: usize,
unit: &'static str,
requirement: String,
},
Range {
value: String,
requirement: String,
},
PatternMismatch {
value: String,
patterns: Vec<String>,
},
NotLexical {
value: String,
primitive: String,
expected: String,
},
}Expand description
How a message departed from the schema. Display text is meant for a log line, not a parser.
Variants§
Undeclared
An element the type does not declare.
Missing
A required element that is absent.
TooFew
Present, but fewer times than minOccurs.
TooMany
Present more times than maxOccurs.
NoAlternative
An alternation with no branch taken.
ManyAlternatives
An alternation with more than one branch taken.
AbstractType
An abstract type used without naming a concrete one.
UnusableType
A declared type the schema does not define, or a cyclic chain.
TooDeep
Nesting past the depth conversion would have refused.
NotEnumerated
A value outside the enumeration its type declares.
allowed is a sample, since some enumerations run to hundreds of values.
Length
A value of the wrong length.
unit is "characters" for the string types and "octets" for
xs:hexBinary, which is the unit XSD’s length facet uses on each.
Range
A number outside the bounds its type declares.
PatternMismatch
A value matching none of the patterns declared at one link of its type’s restriction chain.
NotLexical
A value that is not one of the primitive underneath its type at all.
Trait Implementations§
Source§impl Clone for ViolationKind
impl Clone for ViolationKind
Source§fn clone(&self) -> ViolationKind
fn clone(&self) -> ViolationKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more