Skip to main content

Crate mig_assembly

Crate mig_assembly 

Source
Expand description

MIG-guided EDIFACT tree assembly.

Two-pass approach:

  1. Tokenize EDIFACT into Vec<RawSegment> (existing parser)
  2. Assemble segments into typed MIG tree guided by MIG schema

§Usage

let segments = parse_to_segments(input);
let tree = assemble_generic(&segments, &mig_schema)?;

Re-exports§

pub use diagnostic::StructureDiagnostic;
pub use diagnostic::StructureDiagnosticKind;
pub use error::AssemblyError;
pub use navigator::AssembledTreeNavigator;
pub use service::ConversionService;
pub use tokenize::split_messages;
pub use tokenize::InterchangeChunks;
pub use tokenize::MessageChunk;

Modules§

assembler
Recursive descent assembler — MIG-guided segment consumption.
cursor
Segment cursor for tracking position during MIG-guided assembly.
diagnostic
Structure diagnostics emitted during MIG-guided assembly.
disassembler
Tree disassembler — converts AssembledTree back to ordered segments.
error
matcher
Segment matching logic for MIG-guided assembly.
navigator
GroupNavigator implementation backed by AssembledTree.
parsing
pid_detect
PID detection from EDIFACT segments.
pid_filter
PID-specific MIG filtering using AHB segment numbers.
renderer
EDIFACT string renderer from disassembled segments.
roundtrip
Full roundtrip pipeline: EDIFACT → assemble → disassemble → render.
service
High-level conversion service that orchestrates the full pipeline.
test_support
Shared test helpers for constructing MIG schema test fixtures.
tokenize
EDIFACT tokenization helper — collects segments from input into a Vec.