Enum TimeScale
#[non_exhaustive]pub enum TimeScale {
Show 13 variants
TAI,
TT,
ET,
TDB,
UTC,
GPST,
GST,
BDT,
QZSST,
TCG,
TCB,
TL,
TCL,
}Expand description
Enum of the different time systems available
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TAI
TAI is the representation of an Epoch internally
TT
Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))
ET
Ephemeris Time as defined by SPICE (slightly different from true TDB)
TDB
Dynamic Barycentric Time (TDB) (higher fidelity SPICE ephemeris time)
UTC
Universal Coordinated Time
GPST
GPS Time scale whose reference epoch is UTC midnight between 05 January and 06 January 1980; cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29. |UTC - TAI| = 19 Leap Seconds on that day.
GST
Galileo Time scale
BDT
BeiDou Time scale
QZSST
QZSS Time scale has the same properties as GPST but with dedicated clocks
TCG
Geocentric Coordinate Time
TCB
Barycentric Coordinate Time
TL
Experimental Lunar Time, option (iii) from the Lunar Reference Timescale paper, A Bourgoin*, P Defraigne and F Meynadier
TL is defined as a linear scaling of TCL such that TL has no secular drift with respect to TT. Since this implementation omits the bounded periodic TCL-TT terms, TL is equivalent to TT after the common 1977 reference epoch.
TCL
Experimental mean Lunar Coordinate Time of Lunar reference timescale, A Bourgoin*, P Defraigne and F Meynadier
This is not a full IAU-quality TCL realization. It models only the conventional secular mean rate between TCL and TT:
d(TCL - TT) / dTT ≈ 6.8e-10The bounded periodic TCL-TT terms and ephemeris-dependent relativistic integral are intentionally omitted
Implementations§
§impl TimeScale
impl TimeScale
pub const fn reference_epoch(self) -> Epoch
pub const fn reference_epoch(self) -> Epoch
Returns this time scale’s reference epoch: Time Scale initialization date, expressed as an Epoch in TAI
§impl TimeScale
impl TimeScale
pub const fn uses_leap_seconds(&self) -> bool
pub const fn uses_leap_seconds(&self) -> bool
Returns true if self takes leap seconds into account :rtype: bool
Trait Implementations§
§impl<'de> Deserialize<'de> for TimeScale
impl<'de> Deserialize<'de> for TimeScale
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeScale, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeScale, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl From<u8> for TimeScale
Allows conversion of a u8 into a TimeSystem.
Mapping: 1: TT; 2: ET; 3: TDB; 4: UTC; 5: GPST; 6: GST; 7: BDT; 8: QZSST; 9: TCG; 10: TCB; anything else: TAI
impl From<u8> for TimeScale
Allows conversion of a u8 into a TimeSystem. Mapping: 1: TT; 2: ET; 3: TDB; 4: UTC; 5: GPST; 6: GST; 7: BDT; 8: QZSST; 9: TCG; 10: TCB; anything else: TAI
§impl<'py> IntoPyObject<'py> for TimeScale
impl<'py> IntoPyObject<'py> for TimeScale
§impl Ord for TimeScale
impl Ord for TimeScale
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialOrd for TimeScale
impl PartialOrd for TimeScale
§impl PyTypeInfo for TimeScale
impl PyTypeInfo for TimeScale
§const NAME: &'static str = <Self as ::pyo3::PyClass>::NAME
const NAME: &'static str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
§const MODULE: Option<&'static str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&'static str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.§impl Serialize for TimeScale
impl Serialize for TimeScale
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for TimeScale
impl Eq for TimeScale
impl StructuralPartialEq for TimeScale
Auto Trait Implementations§
impl Freeze for TimeScale
impl RefUnwindSafe for TimeScale
impl Send for TimeScale
impl Sync for TimeScale
impl Unpin for TimeScale
impl UnsafeUnpin for TimeScale
impl UnwindSafe for TimeScale
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.