pub fn validate_unt_segment_count(
segments: &[OwnedSegment],
) -> Option<ValidationIssue>Expand description
Validate that the UNT segment count matches the actual number of segments.
The UNT segment’s first data element (D0074) declares the number of segments in the message, counting from UNH to UNT inclusive. This function compares that declared value against the actual segment count.
Pass per-message segments (from [MessageChunk::message_segments()] or
[MessageChunk::all_segments()]), not the full interchange. For multi-message
interchanges, call once per message.
Returns Some(ValidationIssue) if there’s a mismatch, None if correct.