Skip to main content

Module pipeline

Module pipeline 

Source
Expand description

Three-stage rendering pipeline types (chartml 5.0 phase 2).

The pipeline splits chart rendering into three explicit stages so each has a single typed responsibility:

  YAML ──► FETCH ──► FetchedChart ──► TRANSFORM ──► PreparedChart ──► render ──► SVG
           (async)                    (async)                          (sync)

Phase 2 introduces the type shapes and exposes the explicit ChartML::fetch / transform / render_prepared_to_svg / render_to_svg_async methods. No provider trait yet — fetch reads from pre-registered sources only. Phase 3 adds the provider trait, resolver, cache, and parallel fetch.

All types derive Clone because:

  • DataTable is Arc-backed internally, so cloning sources is cheap;
  • Clone enables the “fetch + transform once, resize-render N times” use case (e.g. responsive layouts) without re-running upstream stages.

Structs§

FetchMetadata
Per-fetch telemetry. per_source stays empty in phase 2 (no provider dispatch yet); phase 3 populates it from FetchResult.metadata per declared source.
FetchedChart
Stage 1 output: the spec plus every named source resolved to a DataTable.
PreparedChart
Stage 2 output: spec plus the single transformed table the renderer will consume.
PreparedMetadata
Per-transform telemetry. Captures whether the middleware actually ran (vs. passthrough) plus the names of the sources the transform consumed.
RenderOptions
Render-time knobs for the chartml 5.0 pipeline.