Skip to main content

IntoScaleWith

Trait IntoScaleWith 

Source
pub trait IntoScaleWith<Target: TimeScale>: Sized {
    // Required methods
    fn into_scale_with<P: LeapSecondsProvider>(
        self,
        ls: P,
    ) -> Result<Time<Target>, GnssTimeError>;
    fn into_scale_with_checked<P: LeapSecondsProvider>(
        self,
        ls: P,
    ) -> Result<ConvertResult<Time<Target>>, GnssTimeError>;
}
Expand description

Leap-second-aware conversion between time scales.

Required for conversions involving UTC or any scale derived from UTC.

This trait uses an external LeapSecondsProvider to resolve discontinuities introduced by leap seconds.

Required Methods§

Source

fn into_scale_with<P: LeapSecondsProvider>( self, ls: P, ) -> Result<Time<Target>, GnssTimeError>

Converts using leap-second data.

Source

fn into_scale_with_checked<P: LeapSecondsProvider>( self, ls: P, ) -> Result<ConvertResult<Time<Target>>, GnssTimeError>

Converts and reports whether the result is ambiguous due to a leap-second insertion.

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.

Implementors§