Skip to main content

TimeScale

Trait TimeScale 

Source
pub trait TimeScale:
    Sealed
    + Copy
    + Clone
    + Eq
    + PartialEq
    + Debug {
    const NAME: &'static str;
    const OFFSET_TO_TAI: OffsetToTai;
    const EPOCH_CIVIL: CivilDate;
    const DISPLAY_STYLE: DisplayStyle;
}
Expand description

Marker trait for GNSS / atomic time scales.

This trait is sealed and cannot be implemented outside this crate.

Each scale defines:

Required Associated Constants§

Source

const NAME: &'static str

Short ASCII name of the scale, used in Display/debug output.

Source

const OFFSET_TO_TAI: OffsetToTai

Offset relative to TAI:

STRICT CONTRACT: T_tai = T_self + offset

For contextual scales (UTC, GLONASS), leap-second handling is required.

Source

const EPOCH_CIVIL: CivilDate

Civil date of the scale’s epoch (where Time<S>::EPOCH == 0 ns)

Source

const DISPLAY_STYLE: DisplayStyle

Time display format

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§

Source§

impl TimeScale for Beidou

Source§

const NAME: &'static str = "BDT"

Source§

const OFFSET_TO_TAI: OffsetToTai

Source§

const EPOCH_CIVIL: CivilDate

Source§

const DISPLAY_STYLE: DisplayStyle = DisplayStyle::WeekTow

Source§

impl TimeScale for Galileo

Source§

const NAME: &'static str = "GAL"

Source§

const OFFSET_TO_TAI: OffsetToTai

Source§

const EPOCH_CIVIL: CivilDate

Source§

const DISPLAY_STYLE: DisplayStyle = DisplayStyle::WeekTow

Source§

impl TimeScale for Glonass

Source§

const NAME: &'static str = "GLO"

Source§

const OFFSET_TO_TAI: OffsetToTai = OffsetToTai::Contextual

Source§

const EPOCH_CIVIL: CivilDate

Source§

const DISPLAY_STYLE: DisplayStyle = DisplayStyle::DayTod

Source§

impl TimeScale for Gps

Source§

const NAME: &'static str = "GPS"

Source§

const OFFSET_TO_TAI: OffsetToTai

Source§

const EPOCH_CIVIL: CivilDate

Source§

const DISPLAY_STYLE: DisplayStyle = DisplayStyle::WeekTow

Source§

impl TimeScale for Tai

Source§

const NAME: &'static str = "TAI"

Source§

const OFFSET_TO_TAI: OffsetToTai

Source§

const EPOCH_CIVIL: CivilDate

Source§

const DISPLAY_STYLE: DisplayStyle = DisplayStyle::Simple

Source§

impl TimeScale for Utc

Source§

const NAME: &'static str = "UTC"

Source§

const OFFSET_TO_TAI: OffsetToTai = OffsetToTai::Contextual

Source§

const EPOCH_CIVIL: CivilDate

Source§

const DISPLAY_STYLE: DisplayStyle = DisplayStyle::Simple