pub enum CardMassUnit {
Grains,
Grams,
}Expand description
Bullet weight. Grains and grams differ by 15.43x, and on the BC path mass never enters
the drag denominator — it touches energy and stability only — so a grams-for-grains slip
yields a trajectory that looks entirely normal. Which is exactly why the unit has to be
stated per-dimension rather than inferred: the dual-printed g / gr box a European
shooter is holding is the normal case, not an edge one.
The one-character wire tokens "g" and "gr" are deliberately NOT accepted, though
"gram"/"grams" and "grain"/"grains" are. Those two tokens are the slip this
dimension exists to prevent: a 175-grain load sent as "g" solves to bit-identical
dials, drift, velocity and time — only the energy column moves, 1009 ft-lb to 15575 — and
the response has no mass label for a reader to catch it on. Nor can a plausibility guard
catch it: bullets run roughly 5–800 grains and roughly 0.3–52 grams, so the two ranges
OVERLAP across 5–52, where 48 grains (a .22 varmint bullet) and 48 grams (a .50 BMG) are
both ordinary. There is no threshold to put a guard at, so the defence has to be the
spelling, and the spelled-out name is the one thing a caller cannot typo into the other
unit.
Variants§
Trait Implementations§
Source§impl Clone for CardMassUnit
impl Clone for CardMassUnit
Source§fn clone(&self) -> CardMassUnit
fn clone(&self) -> CardMassUnit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CardMassUnit
Source§impl Debug for CardMassUnit
impl Debug for CardMassUnit
Source§impl<'de> Deserialize<'de> for CardMassUnit
impl<'de> Deserialize<'de> for CardMassUnit
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>,
impl Eq for CardMassUnit
Source§impl PartialEq for CardMassUnit
impl PartialEq for CardMassUnit
Source§impl Serialize for CardMassUnit
impl Serialize for CardMassUnit
impl StructuralPartialEq for CardMassUnit
Auto Trait Implementations§
impl Freeze for CardMassUnit
impl RefUnwindSafe for CardMassUnit
impl Send for CardMassUnit
impl Sync for CardMassUnit
impl Unpin for CardMassUnit
impl UnsafeUnpin for CardMassUnit
impl UnwindSafe for CardMassUnit
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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.