pub enum CardError {
EmptyOrInvertedDomain {
start_m: f64,
end_m: f64,
},
AnchorOutsideDomain {
anchor_m: f64,
start_m: f64,
end_m: f64,
},
NonPositiveBudget {
axis: &'static str,
value: f64,
},
ZeroMaxRows,
DomainOutsideCurve {
requested_m: f64,
curve_max_m: f64,
},
InvalidTrackingCf {
axis: &'static str,
value: f64,
},
}Expand description
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.
Variants§
EmptyOrInvertedDomain
The domain is not a forward, positive, finite interval. (Angular drop divides by the range, so a start at or below zero has no angular value at all.)
AnchorOutsideDomain
NonPositiveBudget
ZeroMaxRows
DomainOutsideCurve
The domain runs past the last sampled point of the curve, where there is no ground truth to verify against.
InvalidTrackingCf
A tracking correction factor outside crate::adjustment::tracking_cf_in_range’s
locked (0.5, 1.5) band (MBA-1358).
Checked rather than assumed because the failure is SILENT AND CONFIDENT, not loud: a
finite but out-of-band CF – the realistic slip of passing the percentage 95 where
the ratio 0.95 belongs, or an INFINITY – divides every printed value to ~0, so
every measured error is ~0 and the engine would hand back a two-row card of near-zero
dial values reporting budget_met: true. That is a wrong answer on the one field
this whole module exists to make trustworthy, and it is worse than the NaN a zero CF
produces, which at least reports budget_met: false.
Trait Implementations§
impl Copy for CardError
Source§impl Error for CardError
impl Error for CardError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for CardError
Auto Trait Implementations§
impl Freeze for CardError
impl RefUnwindSafe for CardError
impl Send for CardError
impl Sync for CardError
impl Unpin for CardError
impl UnsafeUnpin for CardError
impl UnwindSafe for CardError
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> 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.