pub enum TimeUnit {
Show 31 variants
yottasecond,
zettasecond,
exasecond,
petasecond,
terasecond,
gigasecond,
megasecond,
kilosecond,
hectosecond,
decasecond,
second,
decisecond,
centisecond,
millisecond,
microsecond,
nanosecond,
picosecond,
femtosecond,
attosecond,
zeptosecond,
yoctosecond,
second_sidereal,
day,
day_sidereal,
hour,
hour_sidereal,
minute,
shake,
year,
year_sidereal,
year_tropical,
}Expand description
Time (base UnitDefinition second, s).
Variants§
yottasecond
zettasecond
exasecond
petasecond
terasecond
gigasecond
megasecond
kilosecond
hectosecond
decasecond
second
decisecond
centisecond
millisecond
microsecond
nanosecond
picosecond
femtosecond
attosecond
zeptosecond
yoctosecond
second_sidereal
day
day_sidereal
hour
hour_sidereal
minute
shake
year
year_sidereal
year_tropical
Implementations§
Source§impl TimeUnit
impl TimeUnit
pub fn get_yottasecond() -> UnitDefinition
pub fn get_zettasecond() -> UnitDefinition
pub fn get_exasecond() -> UnitDefinition
pub fn get_petasecond() -> UnitDefinition
pub fn get_terasecond() -> UnitDefinition
pub fn get_gigasecond() -> UnitDefinition
pub fn get_megasecond() -> UnitDefinition
pub fn get_kilosecond() -> UnitDefinition
pub fn get_hectosecond() -> UnitDefinition
pub fn get_decasecond() -> UnitDefinition
pub fn get_second() -> UnitDefinition
pub fn get_decisecond() -> UnitDefinition
pub fn get_centisecond() -> UnitDefinition
pub fn get_millisecond() -> UnitDefinition
pub fn get_microsecond() -> UnitDefinition
pub fn get_nanosecond() -> UnitDefinition
pub fn get_picosecond() -> UnitDefinition
pub fn get_femtosecond() -> UnitDefinition
pub fn get_attosecond() -> UnitDefinition
pub fn get_zeptosecond() -> UnitDefinition
pub fn get_yoctosecond() -> UnitDefinition
pub fn get_second_sidereal() -> UnitDefinition
pub fn get_day() -> UnitDefinition
pub fn get_day_sidereal() -> UnitDefinition
pub fn get_hour() -> UnitDefinition
pub fn get_hour_sidereal() -> UnitDefinition
pub fn get_minute() -> UnitDefinition
pub fn get_shake() -> UnitDefinition
pub fn get_year() -> UnitDefinition
pub fn get_year_sidereal() -> UnitDefinition
pub fn get_year_tropical() -> UnitDefinition
Sourcepub const fn multiplier(&self) -> f64
pub const fn multiplier(&self) -> f64
Multiplier of unit to its base quantity.
Sourcepub fn abbreviation(&self) -> &'static str
pub fn abbreviation(&self) -> &'static str
Abbreviation of unit.
Trait Implementations§
Source§impl FixedQuantity<TimeUnit> for Time
impl FixedQuantity<TimeUnit> for Time
Source§fn convert(&self, unit: TimeUnit) -> Self
fn convert(&self, unit: TimeUnit) -> Self
Convert from this unit to another (creates a copy). No validation of base unit is made.
Source§fn convert_mut(&mut self, unit: TimeUnit)
fn convert_mut(&mut self, unit: TimeUnit)
Convert from this unit to another (modifies current quantity). No validation of base unit is made.
Source§fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
Try to convert from this unit to another (creates a copy)
Source§impl<const N: usize> FixedSliceQuantity<TimeUnit, f64> for TimeArray<N>
impl<const N: usize> FixedSliceQuantity<TimeUnit, f64> for TimeArray<N>
Source§fn values_mut(&mut self) -> &mut [f64]
fn values_mut(&mut self) -> &mut [f64]
Return mutable values in quantity
Source§fn convert(&self, unit: TimeUnit) -> Self
fn convert(&self, unit: TimeUnit) -> Self
Convert a unit of one
UnitType to another of the same type. No validation of base unit is made.Source§fn convert_mut(&mut self, unit: TimeUnit)
fn convert_mut(&mut self, unit: TimeUnit)
Mutate current quantity, convering a unit of one
UnitType to another of the same type. No validation of base unit is made.Source§fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
Attempt to convert the unit given in
unit to a UnitType. Base unit validation is made here.Source§impl FixedSliceQuantity<TimeUnit, f64> for TimeVec
impl FixedSliceQuantity<TimeUnit, f64> for TimeVec
Source§fn values_mut(&mut self) -> &mut [f64]
fn values_mut(&mut self) -> &mut [f64]
Return mutable values in quantity
Source§fn convert(&self, unit: TimeUnit) -> Self
fn convert(&self, unit: TimeUnit) -> Self
Convert a unit of one
UnitType to another of the same type. No validation of base unit is made.Source§fn convert_mut(&mut self, unit: TimeUnit)
fn convert_mut(&mut self, unit: TimeUnit)
Mutate current quantity, convering a unit of one
UnitType to another of the same type. No validation of base unit is made.Source§fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
Attempt to convert the unit given in
unit to a UnitType. Base unit validation is made here.Source§impl From<TimeUnit> for UnitDefinition
impl From<TimeUnit> for UnitDefinition
Source§impl TryFrom<UnitDefinition> for TimeUnit
impl TryFrom<UnitDefinition> for TimeUnit
Source§type Error = RuntimeUnitError
type Error = RuntimeUnitError
The type returned in the event of a conversion error.
Source§impl Unit for TimeUnit
impl Unit for TimeUnit
Source§fn definition(&self) -> UnitDefinition
fn definition(&self) -> UnitDefinition
Return unit definition for this Unit Type
Source§fn try_convert(&self, unit: UnitDefinition) -> Result<f64, RuntimeUnitError>
fn try_convert(&self, unit: UnitDefinition) -> Result<f64, RuntimeUnitError>
Try to compute conversion factor from this unit to another.
Source§fn convert_unchecked(&self, unit: Self) -> f64
fn convert_unchecked(&self, unit: Self) -> f64
Compute conversion factor from this unit to another (no check of unit compatibility is made).
impl Copy for TimeUnit
impl Eq for TimeUnit
impl StructuralPartialEq for TimeUnit
Auto Trait Implementations§
impl Freeze for TimeUnit
impl RefUnwindSafe for TimeUnit
impl Send for TimeUnit
impl Sync for TimeUnit
impl Unpin for TimeUnit
impl UnwindSafe for TimeUnit
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