edi-energy 0.3.0

EDI@Energy EDIFACT parser and validator for the German energy market
Documentation

edi-energy — EDI@Energy EDIFACT parser and validator for the German energy market.

Quick start

use edi_energy::{Platform, AnyMessage, EdiEnergyMessage};

let input: &[u8] = b"UNB+UNOA:3+SENDER+RECEIVER+200101:0900+1'UNH+1+UTILMD:D:11A:UN:S2.2'BGM+E01+11001+9'UNT+2+1'UNZ+1+1'";
let msg = Platform::with_all_profiles().parse(input)?;
let report = msg.validate()?;
assert!(report.is_valid());
# Ok::<(), edi_energy::Error>(())

Supported releases

This crate ships built-in profiles for the S-track (Strom) and G-track (Gas) UTILMD releases introduced by the 2024 format split: S2.1, S2.2 (Strom) and G1.1, G1.2 (Gas).

Classic UTILMD releases (5.5.x) — messages with wire release codes such as 5.5.3a, 5.5.4a, 5.5.5a, 5.5.6a, 5.5.7a, or 5.5.8a — can be parsed (the EDIFACT segment structure is read and typed fields extracted) but cannot be validated: [AnyMessage::validate] and [AnyMessage::validate_against] return [Error::ProfileNotFound] for any classic-track release because no 5.5.x MIG/AHB profiles are bundled.

If you need validation support for classic-track archive messages, build and register custom [registry::Profile] implementations for those releases.