Skip to main content

ScaleKind

Enum ScaleKind 

Source
pub enum ScaleKind {
    JdTt,
    MjdTt,
    JdTdb,
    JdTai,
    JdTcg,
    JdTcb,
    JdGps,
    JdUt1,
    Unix,
}
Expand description

Identifies a time scale or scalar encoding for dispatch.

ScaleKind is the Rust-native counterpart to C ABI scale identifiers. FFI adapters map their own integer discriminants to ScaleKind and then delegate all conversion logic to time_tt_from_scalar and time_tt_to_scalar rather than reimplementing the dispatch matrix.

Variant names follow the <Format><Scale> convention: the prefix names the encoding format (e.g. Jd = Julian Day, Mjd = Modified Julian Day) and the suffix names the time scale (e.g. Tt, Tai, Tdb).

Variants§

§

JdTt

Julian Day on the TT axis (equivalently: Julian Ephemeris Date). Value in days.

§

MjdTt

Modified Julian Day on the TT axis. Value in days.

§

JdTdb

Julian Day on the TDB axis. Value in days.

§

JdTai

Julian Day on the TAI axis. Value in days.

§

JdTcg

Julian Day on the TCG axis. Value in days.

§

JdTcb

Julian Day on the TCB axis. Value in days.

§

JdGps

Julian Day offset from the GPS epoch, on the TAI axis.

The unit is Julian days (not GPS seconds). A value of 1.0 represents one Julian day (86 400 s) elapsed since the GPS epoch. This is distinct from conventional GPS time which is expressed in integer seconds or (week, seconds-of-week). Divide by 86 400 to convert from GPS seconds to this encoding.

§

JdUt1

Julian Day on the UT1 axis. Value in days.

§

Unix

Unix / POSIX time in seconds since 1970-01-01T00:00:00 UTC.

Trait Implementations§

Source§

impl Clone for ScaleKind

Source§

fn clone(&self) -> ScaleKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScaleKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ScaleKind

Source§

fn eq(&self, other: &ScaleKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ScaleKind

Source§

impl Eq for ScaleKind

Source§

impl StructuralPartialEq for ScaleKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.