pub enum IssueKind {
Show 14 variants
MissingRequiredField {
field_name: String,
},
GroupNotAllowed {
group: String,
},
SegmentNotAllowed {
segment: String,
},
FieldConditionNotSatisfied {
field_name: String,
},
ConditionUnknown {
field_name: String,
unresolved: UnresolvedConditions,
},
PackageCardinality {
package_id: String,
present: usize,
min: usize,
max: usize,
codes: Vec<String>,
},
RepeatedInTransaction {
path: String,
count: usize,
},
CodeNotAllowedForPid {
value: String,
allowed: Vec<String>,
},
AnswerNotInList {
answer: String,
list: String,
allowed: Vec<String>,
},
ValueTooLong {
field_name: String,
length: usize,
max: usize,
},
ValueNotNumeric {
field_name: String,
},
UntSegmentCountMismatch {
declared: usize,
actual: usize,
},
UntCountNotVerifiable {
unh_count: usize,
},
StructureDiagnostic {
kind: StructureDiagnosticKind,
segment_id: String,
position: usize,
detail: String,
},
}Expand description
What kind of problem a ValidationIssue reports.
One variant per problem the validator actually emits. ErrorCodes lists 22
code strings, but only these are ever constructed; adding a new check means
adding a variant, which the compiler then forces every narrator to handle.
Variants§
MissingRequiredField
AHB001 — a field the AHB marks mandatory for this PID is absent.
GroupNotAllowed
AHB002 — a segment group is present although its AHB condition does not
hold (Muss [96] without STS+7 ZAP). group is its path (SG4/SG5).
SegmentNotAllowed
AHB002 — a segment is present although its own AHB condition does not
hold (CAV+Z56 Wärmenutzung, Muss [239], without CAV+Z65 in its
SG10). segment is its path (SG4/SG8/SG10/CAV).
FieldConditionNotSatisfied
AHB003 — the field is present but its AHB condition is not satisfied.
ConditionUnknown
AHB005 — the condition expression could not be fully evaluated.
PackageCardinality
AHB006 — number of codes present in a package is outside min..max.
RepeatedInTransaction
AHB007 — a group or segment the AHB allows once per transaction
([2061] “genau einmal je SG4 IDE (Vorgang)”) is sent count times in
one. path is the group or segment (SG4/SG8, SG4/STS).
CodeNotAllowedForPid
COD002 — the value is a valid code but not allowed for this PID.
AnswerNotInList
COD003 — a response’s answer (AJT 4465, STS C556/9013) is not one of the
codes of the EBD or Codeliste it names beside it (AJT 1082, C556/1131):
AJT+ZB5+G_0059. The AHB lists which lists may be named; the EBD
document says what they hold.
ValueTooLong
FMT001 — the value is longer than its MIG format allows (an..512).
ValueNotNumeric
FMT002 — a data element of numeric format (n..10) holds something
that is not a number (O5D2DXBG1A).
UntSegmentCountMismatch
STR007 — UNT’s declared segment count disagrees with the actual count.
UntCountNotVerifiable
STR007 — the input holds several messages, so the count is not checkable.
StructureDiagnostic
STR003 / STR008 — a structure diagnostic raised during assembly.
detail carries the diagnostic’s own message verbatim: some
diagnostics (e.g. mig_assembly::Assembler::assemble_with_diagnostics’s
"Assembly failed: {e}" case) say something not derivable from
(kind, segment_id, position) alone.