Struct astronomical_quantities::Speed
source · pub struct Speed { /* private fields */ }Expand description
Magnitude of the change of an objects position per unit of time
Definition: Length/Duration
Reference unit: Astronomical Units per Day (‘au/d’)
Predefined units:
| Symbol | Name | Definition | Equivalent in ‘au/d’ |
|---|---|---|---|
| km/h | Kilometer per Hour | km/h | 1.604300909344427e-7 |
| m/s | Meter per Second | SI reference unit | 5.775483273639937e-7 |
| c | Speed of Light | ls/s | 173.14463267424034 |
Trait Implementations§
source§impl Div<Speed> for Lengthwhere
Self: HasRefUnit,
Speed: HasRefUnit,
impl Div<Speed> for Lengthwhere Self: HasRefUnit, Speed: HasRefUnit,
source§impl HasRefUnit for Speed
impl HasRefUnit for Speed
source§const REF_UNIT: SpeedUnit = SpeedUnit::AstronomicalUnitsPerDay
const REF_UNIT: SpeedUnit = SpeedUnit::AstronomicalUnitsPerDay
Unit used as reference for scaling the units of
Self::UnitType.source§fn unit_from_scale(amnt: f64) -> Option<Self::UnitType>
fn unit_from_scale(amnt: f64) -> Option<Self::UnitType>
Returns
Some(unit) where unit.scale() == amnt, or None if
there is no such unit.source§fn equiv_amount(&self, unit: Self::UnitType) -> f64
fn equiv_amount(&self, unit: Self::UnitType) -> f64
Returns
factor so that factor * unit == self.source§fn convert(&self, to_unit: Self::UnitType) -> Self
fn convert(&self, to_unit: Self::UnitType) -> Self
Returns
qty where qty == self and qty.unit() is to_unit.source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
Returns true, if
self and other have equivalent amounts, otherwise
false.source§impl Mul<Duration> for Speedwhere
Self: HasRefUnit,
Duration: HasRefUnit,
impl Mul<Duration> for Speedwhere Self: HasRefUnit, Duration: HasRefUnit,
source§impl Mul<Speed> for Durationwhere
Self: HasRefUnit,
Speed: HasRefUnit,
impl Mul<Speed> for Durationwhere Self: HasRefUnit, Speed: HasRefUnit,
source§impl PartialEq<Speed> for Speed
impl PartialEq<Speed> for Speed
source§impl PartialOrd<Speed> for Speed
impl PartialOrd<Speed> for Speed
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Quantity for Speed
impl Quantity for Speed
source§fn new(amount: AmountT, unit: Self::UnitType) -> Self
fn new(amount: AmountT, unit: Self::UnitType) -> Self
Returns a new instance of the type implementing
Quantity.source§fn iter_units<'a>() -> Iter<'a, Self::UnitType>
fn iter_units<'a>() -> Iter<'a, Self::UnitType>
Returns an iterator over the variants of
Self::UnitType.source§fn unit_from_symbol(symbol: &str) -> Option<Self::UnitType>
fn unit_from_symbol(symbol: &str) -> Option<Self::UnitType>
Returns
Some(unit) where unit.symbol() == symbol, or None if
there is no such unit.source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
Return
true if self and other have the same unit and their amounts
are equal, otherwise false.source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Returns the partial order of
selfs and others amounts, if both have
the same unit, otherwise None.impl Copy for Speed
impl Eq for Speed
Auto Trait Implementations§
impl RefUnwindSafe for Speed
impl Send for Speed
impl Sync for Speed
impl Unpin for Speed
impl UnwindSafe for Speed
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