pub enum SpeedUnit {
KilometerPerHour,
MeterPerSecond,
AstronomicalUnitsPerDay,
SpeedOfLight,
}Expand description
Unit of quantity Speed.
Variants
KilometerPerHour
km/h
MeterPerSecond
SI reference unit
AstronomicalUnitsPerDay
Reference unit of quantity Speed
SpeedOfLight
ls/s
Trait Implementations
sourceimpl LinearScaledUnit for SpeedUnit
impl LinearScaledUnit for SpeedUnit
sourceconst REF_UNIT: Self = Self::AstronomicalUnitsPerDay
const REF_UNIT: Self = Self::AstronomicalUnitsPerDay
Unit used as reference for scaling the units.
sourcefn 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. Read more
sourcefn is_ref_unit(&self) -> bool
fn is_ref_unit(&self) -> bool
Returns true if self is the reference unit of its unit type.
sourceimpl Unit for SpeedUnit
impl Unit for SpeedUnit
type QuantityType = Speed
type QuantityType = Speed
Associated type of quantity
sourcefn 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.
sourcefn 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. Read more
sourcefn as_qty(&self) -> Self::QuantityType
fn as_qty(&self) -> Self::QuantityType
Returns 1 * self
impl Copy for SpeedUnit
impl Eq for SpeedUnit
impl StructuralEq for SpeedUnit
impl StructuralPartialEq for SpeedUnit
Auto Trait Implementations
impl RefUnwindSafe for SpeedUnit
impl Send for SpeedUnit
impl Sync for SpeedUnit
impl Unpin for SpeedUnit
impl UnwindSafe for SpeedUnit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more