-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
ion-schema-rust/ion-schema/src/violation.rs
Lines 92 to 116 in 34eec9e
/// Represents violation code that indicates the type of the violation | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub enum ViolationCode { | |
AllTypesNotMatched, | |
AnnotationMismatched, | |
ElementMismatched, // this is used for mismatched elements in containers | |
ElementNotDistinct, // this is used for elements that are not distinct in containers | |
FieldNamesMismatched, // this is used for mismatched field names in a struct | |
FieldNamesNotDistinct, // this is used for field names that are not distinct in a struct | |
FieldsNotMatched, | |
InvalidIeee754Float, // this is used for ieee754_float constraint | |
InvalidLength, // this is used for any length related constraints (e.g. container_length, byte_length, codepoint_length) | |
InvalidNull, // if the value is a null for type references that doesn't allow null | |
InvalidOpenContent, // if a container contains open content when `content: closed` is specified | |
InvalidValue, // this is used for valid_values constraint | |
MissingAnnotation, // if the annotation is missing for annotations constraint | |
MissingValue, // if the ion value is missing for a particular constraint | |
MoreThanOneTypeMatched, | |
NoTypesMatched, | |
RegexMismatched, // this is used for regex constraint | |
TypeConstraintsUnsatisfied, | |
TypeMatched, | |
TypeMismatched, | |
UnexpectedAnnotation, // if unexpected annotation is found for annotations constraint | |
} |
ViolationCode
should be marked as #[non_exhaustive]
so that new violation codes can be added if/when new versions of ISL add new constraints.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working