pub enum PidValidationError {
MissingEntity {
entity: String,
ahb_status: String,
severity: Severity,
},
MissingField {
entity: String,
field: String,
ahb_status: String,
rust_type: Option<String>,
valid_values: Vec<(String, String)>,
severity: Severity,
},
InvalidCode {
entity: String,
field: String,
value: String,
valid_values: Vec<(String, String)>,
},
NotAllowed {
entity: String,
field: String,
value: Option<String>,
ahb_status: String,
severity: Severity,
},
ConditionNotSatisfied {
entity: String,
field: String,
value: String,
ahb_status: String,
},
RepeatedInTransaction {
entity: String,
count: usize,
ahb_status: String,
},
NotANumber {
entity: String,
field: String,
value: String,
format: String,
},
TooLong {
entity: String,
field: String,
length: usize,
format: String,
},
}Expand description
A single PID validation error.
Variants§
MissingEntity
An entire entity is missing from the interchange.
MissingField
A required field is None/missing.
Fields
InvalidCode
A code field has a value not in the allowed set.
NotAllowed
Something is present although its condition does not hold: an entity
(field empty), a code (value) or a list element. Only a
condition-aware validator raises it, for a Muss/X status with a
condition that evaluates to false where the element sits. A warning for
now, while the check proves itself on real messages.
ConditionNotSatisfied
A present value that breaks its own element’s condition — what the
AHB says the value must be: [360] “nur Antwortcodes aus dem Cluster
Zustimmung” with A50, [914] “> 0” with O5D2DXBG1A. Only a
condition-aware validator raises it; the EDIFACT validator reports the
same as AHB003.
RepeatedInTransaction
An entity sent count times in one transaction although its group is
allowed once per transaction (UTILMD [2061] “genau einmal je SG4 IDE”).
NotANumber
A value of a field whose MIG format is numeric (n..10) that is not a
number (O5D2DXBG1A): it cannot be sent as it is.
TooLong
A value longer than the field’s MIG format allows (an..512): it
cannot be sent as it is.
Implementations§
Trait Implementations§
Source§impl Clone for PidValidationError
impl Clone for PidValidationError
Source§fn clone(&self) -> PidValidationError
fn clone(&self) -> PidValidationError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more