#[non_exhaustive]pub enum Mismatch {
Primitive {
expected: &'static str,
actual: &'static str,
},
EnumMember {
member: String,
declared: Vec<String>,
},
SelectMember {
written: String,
select: String,
},
FixedWidth {
expected: usize,
actual: usize,
},
ExpectedReference {
declared: String,
actual: &'static str,
},
TypedOutsideSelect {
written: String,
declared: String,
},
TypedWrongType {
written: String,
declared: String,
},
UntypedSelectValue {
select: String,
actual: &'static str,
},
}Expand description
Why a value does not fit its declared type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Primitive
The written form is not what the primitive accepts.
Fields
EnumMember
An enumeration constant the schema does not declare.
Fields
SelectMember
A typed value whose type is not a member of the declared SELECT.
FixedWidth
A STRING(n) FIXED value written at the wrong width.
ExpectedReference
A value that is not an entity reference, in a slot only an entity reference can fill: an entity-typed slot, or a SELECT of entities.
Fields
TypedOutsideSelect
A typed parameter of the declared type, or of a specialisation of it, where the declared type is not a SELECT. ISO 10303-21:2016 §12.1.6 writes such a value bare.
Fields
TypedWrongType
A typed parameter whose type is not the declared non-SELECT type: the wrong form and the wrong type.
Fields
UntypedSelectValue
A bare value where the declared type is a SELECT. ISO 10303-21:2016 §12.1.8 writes every value of a SELECT that is not an entity instance as a typed parameter naming its type.