pub trait AbsoluteTimeScale: TimeScale {
const EPOCH: Date;
}Expand description
TimeScale that is fixed in calendrical time by an absolute epoch. Note that this does not yet
unambiguously define the scale: for that, it must be linked to a well-defined scale like TAI or
UTC (for example, by implementing the TerrestrialTime trait).
Required Associated Constants§
Sourceconst EPOCH: Date
const EPOCH: Date
Determines the epoch used to convert date-time of this time scale into the equivalent
time-since-epoch TimePoint representation. For simplicity, epochs must fall on date
boundaries.
Note that this epoch does not bear any “real” significance: it is merely a representational choice. In principle, it may even be distinct from the “actual” epoch, if any is defined, for a time scale. For GPS, for example, the epoch is well-defined as 1980-01-06T00:00:00 UTC, but it would not necessarily be wrong to use a different date here. In practice, of course, it is more convenient to choose the actual epoch where one is defined.
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.