Skip to main content

detect_format_version

Function detect_format_version 

Source
pub fn detect_format_version(edifact: &str) -> Result<DetectResult, DetectError>
Expand description

Detect the BDEW format version of an EDIFACT message.

Performs a single-pass scan of the input, captures the first UNH segment’s S009 version, and looks (message_type, unh_version) up in a static table. Scanning stops after the first UNH, so multi-message interchanges are detected from the first message only.