Expand description
The serve-side render layer (Phase 12): the shared, versioned
LayoutDescriptor serde shape (Plan 01) the offline emitter and the
writer-only serve path (Plan 02) both use.
The serve-side, WRITER-ONLY render module (Phase 12).
Plan 01 landed the shared, versioned LayoutDescriptor serde shape
([layout]) — the umya-free, zip-free single definition the offline emitter
and the serve-time writer share. Plan 02 (this code) adds the writer itself:
[render_xlsx] replays a LayoutDescriptor and injects the executor’s
already-computed values into a “copy of the workbook, filled in,” producing
valid, DETERMINISTIC .xlsx bytes IN MEMORY (no filesystem — Lambda-safe,
RESEARCH Pitfall 6).
The writer links rust_xlsxwriter (a WRITER; it pulls the zip deflate
container but NO workbook reader — D-01, the single deliberate cross-phase
purity-gate relaxation). It is reader-free: just purity-check proves
umya/quick-xml stay absent from the served tree while asserting the
writer is present.
Determinism (review item 8, T-12-15) is a FIRST-CLASS invariant: the writer
pins the workbook’s document properties to a FIXED creation datetime + empty
author/metadata so two renders of the same (layout, run) are byte-identical.
Plan 03’s regenerate-on-read returns fresh bytes every read and relies on
this byte-stability; the invariant is proven HERE (a determinism test) where
it is introduced, not deferred.
Re-exports§
pub use layout::*;
Modules§
- layout
- The shared, versioned
LayoutDescriptor/SheetLayout/CellLayoutserde shapes (D-05) — the FULL workbook-layout descriptor the bundle’slayout.jsonmember serializes and the writer replays. The shared, versionedLayoutDescriptorserde model (Phase 12, Plan 01).
Enums§
- Render
Error - A fallible render failure (review item 8 — the writer value path is
panic-free; a malformed coordinate / non-finite value / writer error surfaces
as an
Err, NEVER a panic and NEVER a bogus cell). OwnedStringdetail to match the crate’sLintFindingerror style (no borrow across the API).
Functions§
- normalize_
formula_ for_ writer - Normalize a captured formula for the
rust_xlsxwriterwriter (review item 4). - render_
xlsx - Render a
LayoutDescriptor+ the executor’sRunResultinto valid, DETERMINISTIC.xlsxbytes IN MEMORY (review item 8, D-01).