Skip to main content

validate_edifact_message

Function validate_edifact_message 

Source
pub fn validate_edifact_message<E: ConditionEvaluator>(
    all_segments: &[OwnedSegment],
    filtered_mig: &MigSchema,
    workflow: &AhbWorkflow,
    evaluator: E,
    external: &dyn ExternalConditionProvider,
    level: ValidationLevel,
) -> ValidationReport
Expand description

Validate one message’s assembled segments against its AHB workflow.

Callers resolve filtered_mig, workflow, and evaluator from wherever they hold the data (the API from its MigServiceRegistry, edifact-mapper from the data bundle) and pass the already-collected all_segments (message body plus envelope for MIGs that cover it). Assembly config, validated-tree construction, UNT-count and structure diagnostics all live here so the two entry points can never drift.