pub enum ReticleError {
NonPositiveMagnification {
magnification: f64,
},
NonPositiveReferenceMagnification {
reference_magnification: f64,
},
NoMarks,
TooManyMarks {
count: usize,
max: usize,
},
NonFiniteMark {
index: usize,
},
NonFiniteHold {
drop_mil: f64,
wind_mil: f64,
},
InvalidGeneratorParameter {
parameter: &'static str,
value: f64,
rule: &'static str,
},
}Expand description
Why a reticle operation was rejected. Typed rather than stringly, so front ends can render their own wording and the FFI can map to a code.
Variants§
NonPositiveMagnification
magnification was not finite and strictly positive. Checked on EVERY focal plane
— an FFP hold does not depend on it, but zero magnification is not a physical
optic and silently accepting it would mask a caller bug.
NonPositiveReferenceMagnification
An SFP reticle carried a non-finite or non-positive
ReticleDescription::reference_magnification, which its subtension scaling
divides by conceptually and multiplies by literally.
NoMarks
The description carried no marks. A hold point has nothing to be near.
TooManyMarks
The description carried more than MAX_RETICLE_MARKS marks.
NonFiniteMark
A mark’s coordinates were not finite.
NonFiniteHold
The supplied firing solution (drop_mil / wind_mil) was not finite.
InvalidGeneratorParameter
A generator parameter violated its rule.
Trait Implementations§
Source§impl Clone for ReticleError
impl Clone for ReticleError
Source§fn clone(&self) -> ReticleError
fn clone(&self) -> ReticleError
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 ReticleError
impl Debug for ReticleError
Source§impl Display for ReticleError
impl Display for ReticleError
Source§impl Error for ReticleError
impl Error for ReticleError
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()
Source§impl PartialEq for ReticleError
impl PartialEq for ReticleError
impl StructuralPartialEq for ReticleError
Auto Trait Implementations§
impl Freeze for ReticleError
impl RefUnwindSafe for ReticleError
impl Send for ReticleError
impl Sync for ReticleError
impl Unpin for ReticleError
impl UnsafeUnpin for ReticleError
impl UnwindSafe for ReticleError
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.