pub struct PdfCardOptionsV1 {
pub title: Option<String>,
pub location: Option<String>,
pub powder: Option<String>,
pub bullet: Option<String>,
pub target_speed: Option<f64>,
pub font_scale: Option<f64>,
pub font_preset: Option<String>,
pub bold_data: bool,
}Expand description
Presentation knobs for the PDF dope card: the header/footer labels the printed card
carries and the table’s font size. The ballistics axes it prints (elevation unit,
windage unit, click graduations, tracking CFs, zero-set biases) are NOT here — they are
already fields on CardRequestV1, shared with the on-screen card, precisely so the
two cannot disagree about what a row means.
Every field is optional and defaults to the CLI dope card’s own default.
Fields§
§title: Option<String>Leading text of header line 1 — the CLI’s rifle/profile name. Default
"Dope Card". Long headers are truncated to fit the page.
location: Option<String>Header Loc: label. Default empty.
powder: Option<String>Footer Powder: label. Default empty.
bullet: Option<String>Footer Bullet: label. Default empty.
target_speed: Option<f64>Crossing-target speed for the Lead column, in the request’s units speed unit
(mph imperial / m/s metric) — the same convention as the CLI’s --target-speed
(MBA-1325). The lead is speed * time-of-flight for a full-value 90° crossing,
held on the windage axis, exactly as trajectory -o pdf computes it.
Absent means “this card carries no lead data”: the Lead column renders as em-dashes
rather than a column of confident-looking zeroes. An explicit 0.0 is a different
statement — a stationary target, whose lead genuinely is zero — and prints zeroes,
matching the CLI’s --target-speed 0 default.
font_scale: Option<f64>Data-table font scale. Must be finite and within
crate::pdf_dope_card::FONT_SCALE_RANGE (0.5..=3.0); out-of-band values are
rejected rather than silently clamped, so what a stored request asks for is what it
gets. Mutually exclusive with font_preset. Default 1.0.
font_preset: Option<String>Named font scale: "small" (0.8), "medium" (1.0), "large" (1.4) — the CLI’s
--font-preset vocabulary, single-letter aliases included. An unrecognized preset
is an error here (the CLI warns and falls back to medium; a stored request should
not silently render at a size it did not ask for). Mutually exclusive with
font_scale.
bold_data: boolRender the data rows in bold. Default false.
Trait Implementations§
Source§impl Clone for PdfCardOptionsV1
impl Clone for PdfCardOptionsV1
Source§fn clone(&self) -> PdfCardOptionsV1
fn clone(&self) -> PdfCardOptionsV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PdfCardOptionsV1
impl Debug for PdfCardOptionsV1
Source§impl Default for PdfCardOptionsV1
impl Default for PdfCardOptionsV1
Source§fn default() -> PdfCardOptionsV1
fn default() -> PdfCardOptionsV1
Source§impl<'de> Deserialize<'de> for PdfCardOptionsV1
impl<'de> Deserialize<'de> for PdfCardOptionsV1
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 PdfCardOptionsV1
impl PartialEq for PdfCardOptionsV1
Source§impl Serialize for PdfCardOptionsV1
impl Serialize for PdfCardOptionsV1
impl StructuralPartialEq for PdfCardOptionsV1
Auto Trait Implementations§
impl Freeze for PdfCardOptionsV1
impl RefUnwindSafe for PdfCardOptionsV1
impl Send for PdfCardOptionsV1
impl Sync for PdfCardOptionsV1
impl Unpin for PdfCardOptionsV1
impl UnsafeUnpin for PdfCardOptionsV1
impl UnwindSafe for PdfCardOptionsV1
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.