Skip to main content

LeapSeconds

Trait LeapSeconds 

Source
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§

Source

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".

Implementors§