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.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IssueKind
impl<'de> Deserialize<'de> for IssueKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IssueKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IssueKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for IssueKind
Source§impl Serialize for IssueKind
impl Serialize for IssueKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for IssueKind
Auto Trait Implementations§
impl Freeze for IssueKind
impl RefUnwindSafe for IssueKind
impl Send for IssueKind
impl Sync for IssueKind
impl Unpin for IssueKind
impl UnsafeUnpin for IssueKind
impl UnwindSafe for IssueKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.