pub trait LeapSeconds {
// Required method
fn tai_minus_utc(&self, at: Instant<Utc>) -> Result<Duration>;
}Expand description
Leap-second table: TAI − UTC at a given instant.
A port because any table expires (IERS announces about six months ahead);
past its validity an implementation returns KernelError::OutsideValidity
rather than the last known value. Implementations: compiled-in table with
expiry, file, or GNSS receiver-reported offset.
Required Methods§
Sourcefn tai_minus_utc(&self, at: Instant<Utc>) -> Result<Duration>
fn tai_minus_utc(&self, at: Instant<Utc>) -> Result<Duration>
TAI − UTC at a UTC instant: 37 s since 2017 until the next leap
second.
§Errors
KernelError::OutsideValidity outside the table’s validity.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".