pub struct CardTruncation {
pub requested_end: f64,
pub last_row: f64,
pub reach: f64,
}Expand description
A card that stopped short of the rows it was asked for, in the caller’s DISPLAY unit (MBA-1476 follow-up).
Refusing to FABRICATE a row the flight never reached is right, and stays. Refusing to
print the rows it did reach is not: a .22 LR asked for the default 1200 yd card should
see its hundred-yard lines and learn where the bullet stops, not a bare exit code. So the
card truncates, and this is the record of that — carried to stderr for a CLI reader and as
a structured field on every JSON/bridge surface, because a truncation a caller cannot
detect is its own silent failure.
Fields§
§requested_end: f64The furthest row the card asked for (its --end).
last_row: f64The last row it could actually print.
reach: f64How far the solved flight itself got — a property of the load, not of the request.
Implementations§
Source§impl CardTruncation
impl CardTruncation
Sourcepub fn message(&self, unit: &str) -> String
pub fn message(&self, unit: &str) -> String
The one wording every truncated card surface uses. unit labels the display distance
unit (“yd” / “m”).
Sourcepub fn printed_note(&self, unit: &str) -> String
pub fn printed_note(&self, unit: &str) -> String
The same notice sized for PAPER: the one line a printed card carries in its footer (MBA-1477).
Self::message is written for a terminal, where a 180-character sentence wraps and
costs nothing. A dope card footer is a single centred line about eighty characters
wide at the fixed footer size, drawn on every page beside the engine/table provenance,
so the printed form states the same three facts — where the card stops, what was
asked for, how far the load flies — and drops the sentence explaining that the missing
rows were not fabricated. Both live on this type so the paper and the terminal cannot
come to say different things about the same card.
Trait Implementations§
Source§impl Clone for CardTruncation
impl Clone for CardTruncation
Source§fn clone(&self) -> CardTruncation
fn clone(&self) -> CardTruncation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CardTruncation
impl Debug for CardTruncation
Source§impl From<CardTruncationV1> for CardTruncation
Back to the engine type, so the wording lives on CardTruncation alone and no surface
has to restate the field mapping in order to say the same sentence.
impl From<CardTruncationV1> for CardTruncation
Back to the engine type, so the wording lives on CardTruncation alone and no surface
has to restate the field mapping in order to say the same sentence.
Source§fn from(wire: CardTruncationV1) -> Self
fn from(wire: CardTruncationV1) -> Self
Source§impl PartialEq for CardTruncation
impl PartialEq for CardTruncation
impl Copy for CardTruncation
impl StructuralPartialEq for CardTruncation
Auto Trait Implementations§
impl Freeze for CardTruncation
impl RefUnwindSafe for CardTruncation
impl Send for CardTruncation
impl Sync for CardTruncation
impl Unpin for CardTruncation
impl UnwindSafe for CardTruncation
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.