Skip to main content

Module card

Module card 

Source
Expand description

Shared display-ready row type behind the CLI’s card-shaped table/CSV/JSON surfaces (0.33.0 decision-support Plan B Task 9).

come-ups, range-table, wind-card and compare each grew their own function-local row struct (ComeUpRow/RangeRow/WindRow/LoadRow) that said the same handful of things – range, drop, wind, velocity, energy, time – a different way, which blocked any shared card machinery between them. CardRow is the display-ready superset: every surface populates only the fields it has ever had and leaves the rest None / empty, so each surface’s existing table/CSV/JSON writer keeps reading the identical numbers it always did (pinned byte-identical by tests/card_golden_cli.rs).

No feature gate: this module must compile for wasm32-unknown-unknown with no default features (pure data, no fs, no clap, no pdf). Task 10 rewrites the PDF dope card on &[CardRow]; Task 11 grows an adaptive-card engine in this module.

Structs§

AdaptiveBudget
The reconstruction error a shooter is willing to accept, per axis, in the card’s printed adjustment unit (mil for CardAdjustmentUnit::Mil, the locked-3438 MOA for CardAdjustmentUnit::Moa). The caller converts; this engine never guesses a unit.
AdaptiveCardReportV1
What an adaptive card is, plus what its own numbers were measured to be worth.
AdaptiveRequest
Everything one adaptive card needs beyond the solved curve itself.
CardRow
One card row. Display-ready values in the surface’s chosen units (exactly what the legacy per-surface structs stored), so rendering is unchanged; range is f64 metres- or-display per the surface’s existing convention — DO NOT re-convert anything.

Enums§

CardAdjustmentUnit
The printed adjustment unit of a card’s dial columns.
CardError
Every way an adaptive_card request can be rejected. All six are structured: a range a shooter asked for and did not get back is information, never a silent drop.

Constants§

ADAPTIVE_CARD_SCHEMA_VERSION_V1
Schema version of AdaptiveCardReportV1. Bump only for a breaking shape change.

Functions§

adaptive_card
Build an adaptive range card and measure what it is worth.