pub struct StoredCardResponseV1 {
pub kind: String,
pub units: StoredCardUnitsBlockV1,
pub rows: Vec<StoredCardRowV1>,
pub schema_version: Option<u32>,
pub zero_distance: Option<f64>,
pub bc_for_solve: Option<f64>,
pub bc_ladder: Option<StoredCardBcLadderV1>,
pub wind_speeds: Vec<f64>,
pub wind_angles_deg: Vec<f64>,
pub extra_angle_rows: Vec<Vec<StoredCardRowV1>>,
pub truncation: Option<StoredCardTruncationV1>,
}Expand description
A stored CardResponseV1, as a deserializable mirror.
CardResponseV1 is Serialize only (and its units block holds &'static strs), so
a stored response is read back through this twin. It accepts the response document
unchanged, field for field: kind and units are load-bearing here — they say what the
rows ARE and what a row MEANS — while the descriptive scalars are optional so a card
stored by an older engine still prints.
Deliberately NOT deny_unknown_fields (unlike CardRequestV1, where the caller
really is the author of the document). What arrives here is this engine’s own output,
round-tripped through an app’s storage — never hand-written input — so strictness buys
no validation and costs a hard cross-version break: the FIRST field ever added to
CardResponseV1 would make every card saved by the newer platform completely
unexportable on the older one. The two apps carry independent engine pins and ship
through separate stores, so that staggering is the normal case, not a downgrade. An
unknown field is therefore ignored, exactly as the apps’ own decoders ignore it, and the
stored cells still reach the paper. The same reasoning applies to
StoredCardUnitsBlockV1 and StoredCardRowV1 below.
Fields§
§kind: StringWhich card this is. Anything but PDF_CARD_KIND is refused.
units: StoredCardUnitsBlockV1Column labels and the range unit of the stored rows. The printed headings are these, not the request’s, because these are what the rows were computed in.
rows: Vec<StoredCardRowV1>The rows to print, in order.
schema_version: Option<u32>§zero_distance: Option<f64>§bc_for_solve: Option<f64>The scalar BC the stored rows were computed with; printed in the footer when the card
carries no bc_ladder. Absent (a card saved by an engine before
CardResponseV1::bc_for_solve existed) falls back to the request’s published
ballistic_coefficient. Under a ladder it is only the interior-gap fallback, and the
footer prints the ladder’s range instead (MBA-1601).
bc_ladder: Option<StoredCardBcLadderV1>The CardResponseV1::bc_ladder block, round-tripped (MBA-1601): present when the
stored rows flew a BC ladder, and then the footer’s BC: states the ladder’s range.
A card saved before the block existed has none, and reprints its stored scalar exactly as before: the reprint never re-derives a ladder from the request, so a solve and a reprint of the same document cannot be labelled differently. Regenerating such a card prints the range.
wind_speeds: Vec<f64>Present only on a wind card, and therefore a refusal here.
wind_angles_deg: Vec<f64>§extra_angle_rows: Vec<Vec<StoredCardRowV1>>§truncation: Option<StoredCardTruncationV1>Present only when the stored card itself stopped short of the rows its request asked
for — the CardResponseV1::truncation block, round-tripped (MBA-1477).
Without this the reprint path loses the notice: StoredCardResponseV1 ignores unknown
fields by design, so a saved card whose rows stopped short came back through here as an
unremarkable short card and printed with nothing on the paper saying rows were missing.
The screen it was saved from said so; the paper made from that very document did not.
A card saved before this field existed simply has no block, which is indistinguishable from an untruncated card and is the best that can be said of it.
Trait Implementations§
Source§impl Clone for StoredCardResponseV1
impl Clone for StoredCardResponseV1
Source§fn clone(&self) -> StoredCardResponseV1
fn clone(&self) -> StoredCardResponseV1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoredCardResponseV1
impl Debug for StoredCardResponseV1
Source§impl Default for StoredCardResponseV1
impl Default for StoredCardResponseV1
Source§fn default() -> StoredCardResponseV1
fn default() -> StoredCardResponseV1
Source§impl<'de> Deserialize<'de> for StoredCardResponseV1
impl<'de> Deserialize<'de> for StoredCardResponseV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for StoredCardResponseV1
impl PartialEq for StoredCardResponseV1
impl StructuralPartialEq for StoredCardResponseV1
Auto Trait Implementations§
impl Freeze for StoredCardResponseV1
impl RefUnwindSafe for StoredCardResponseV1
impl Send for StoredCardResponseV1
impl Sync for StoredCardResponseV1
impl Unpin for StoredCardResponseV1
impl UnwindSafe for StoredCardResponseV1
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.