pub enum MassUnit {
LunarMass,
EarthMass,
JupiterMass,
SolarMass,
}
Expand description
Unit of quantity Mass
.
Variants§
LunarMass
1/27068510·M☉
EarthMass
10000/3329460487·M☉
JupiterMass
1000000/1047348644·M☉
SolarMass
Reference unit of quantity Mass
Trait Implementations§
Source§impl LinearScaledUnit for MassUnit
impl LinearScaledUnit for MassUnit
Source§fn from_scale(amnt: f64) -> Option<Self>
fn from_scale(amnt: f64) -> Option<Self>
Returns
Some(unit)
where unit.scale()
== Some(amnt)
, or None
if there is no such unit.Source§fn is_ref_unit(&self) -> bool
fn is_ref_unit(&self) -> bool
Returns
true
if self
is the reference unit of its unit type.Source§impl Unit for MassUnit
impl Unit for MassUnit
Source§type QuantityType = Mass
type QuantityType = Mass
Associated type of quantity
Source§fn si_prefix(&self) -> Option<SIPrefix>
fn si_prefix(&self) -> Option<SIPrefix>
Returns the SI prefix of
self
, or None is self
is not a SI unit.Source§fn from_symbol(symbol: &str) -> Option<Self>
fn from_symbol(symbol: &str) -> Option<Self>
Returns
Some(unit)
where unit.symbol()
== symbol
, or None
if
there is no such unit.Source§fn as_qty(&self) -> Self::QuantityType
fn as_qty(&self) -> Self::QuantityType
Returns
1 * self
impl Copy for MassUnit
impl Eq for MassUnit
impl StructuralPartialEq for MassUnit
Auto Trait Implementations§
impl Freeze for MassUnit
impl RefUnwindSafe for MassUnit
impl Send for MassUnit
impl Sync for MassUnit
impl Unpin for MassUnit
impl UnwindSafe for MassUnit
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
Mutably borrows from an owned value. Read more