pub enum IssueKind {
MissingRequiredField {
field_name: String,
},
FieldConditionNotSatisfied {
field_name: String,
},
ConditionUnknown {
field_name: String,
unresolved: UnresolvedConditions,
},
PackageCardinality {
package_id: String,
present: usize,
min: usize,
max: usize,
codes: Vec<String>,
},
CodeNotAllowedForPid {
value: String,
allowed: Vec<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.
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.
CodeNotAllowedForPid
COD002 — the value is a valid code but not allowed for this PID.
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.