pub trait TimeScale:
Copy
+ Clone
+ Debug
+ PartialEq
+ PartialOrd
+ 'static {
const LABEL: &'static str;
// Required methods
fn to_jd_tt(value: Days) -> Days;
fn from_jd_tt(jd_tt: Days) -> Days;
}Expand description
Marker trait for time scales.
A time scale defines:
- A human-readable label (e.g.
"JD","MJD","TAI"). - A pair of conversion functions between the scale’s native quantity
(in
Days) and Julian Date in TT (JD(TT)) — the canonical internal representation used throughout the crate.
For pure epoch counters (JD, MJD, Unix Time, GPS) the conversions are trivial constant offsets that the compiler will inline and fold away.
For physical scales (TT, TDB, TAI) the conversions may include function-based corrections (e.g. the ≈1.7 ms TDB↔TT periodic term).
Required Associated Constants§
Required Methods§
Sourcefn to_jd_tt(value: Days) -> Days
fn to_jd_tt(value: Days) -> Days
Convert a quantity in this scale’s native unit to an absolute JD(TT).
Sourcefn from_jd_tt(jd_tt: Days) -> Days
fn from_jd_tt(jd_tt: Days) -> Days
Convert an absolute JD(TT) back to this scale’s native quantity.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.