Skip to main content

Standard

Trait Standard 

Source
pub trait Standard:
    Debug
    + Sized
    + Clone {
    // Required methods
    fn abbrev() -> &'static str;
    fn tt_offset() -> Duration;
    fn tt_scale() -> Option<f64>;
}
Expand description

A standard of time

Required Methods§

Source

fn abbrev() -> &'static str

Short capital-letter abbreviation for the time standard (usually 2 or 3 letters)

Source

fn tt_offset() -> Duration

Offset from Tt (This + offset = TT)

This function is not meant to be called from outside the library. But if you wish to create a new Standard that implements this trait, you’ll need access to this. This should not adjust for leap seconds.

Source

fn tt_scale() -> Option<f64>

Linear scale factor from TT, usually None

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§