1mod civil;
36pub mod constats;
37mod context;
38pub mod coord;
39mod data;
40mod delta_t;
41pub(crate) mod encoding;
42pub mod eop;
43pub mod error;
44mod ext;
45pub mod format;
46pub(crate) mod generated;
47mod interval;
48pub mod scalar;
49mod scale;
50mod sealed;
51mod target;
52mod time;
53
54#[cfg(feature = "serde")]
55#[path = "serde.rs"]
56mod serde_impl;
57#[cfg(feature = "serde")]
58pub mod tagged;
59
60pub use constats::{
61 GPS_EPOCH_JD_TAI, GPS_EPOCH_JD_UTC, GPS_EPOCH_TAI_MINUS_UTC, JULIAN_YEAR_DAYS,
62 UTC_DEFINED_FROM_MJD,
63};
64pub use context::TimeContext;
65pub use coord::{Coord, Offset};
66#[cfg(feature = "runtime-data-fetch")]
67pub use data::active::{
68 fetch_latest_time_data, refresh_runtime_time_data, update_runtime_time_data,
69};
70pub use delta_t::{delta_t_seconds, delta_t_seconds_extrapolated, DELTA_T_PREDICTION_HORIZON_MJD};
71pub use error::{ConversionError, TimeDataError};
72pub use ext::TimeInstant;
73pub use format::{
74 EncodedTime, FormatForScale, GpsTime, InfallibleFormatForScale, J2000Seconds, J2000s,
75 JulianDate, ModifiedJulianDate, TimeFormat, Unix, UnixTime, GPS, JD, MJD,
76};
77pub use generated::{
78 EOP_END_MJD, EOP_OBSERVED_END_MJD, EOP_START_MJD, MODERN_DELTA_T_OBSERVED_END_MJD,
79};
80pub use interval::{
81 complement_within, Interval, InvalidIntervalError, InvalidPeriodError, Period, PeriodListError,
82};
83pub use scalar::{
84 scalar_add_days, scalar_difference_in_days, time_tt_from_scalar, time_tt_to_scalar, ScaleKind,
85};
86pub use scale::{ContinuousScale, CoordinateScale, Scale, TAI, TCB, TCG, TDB, TT, UT1, UTC};
87pub use target::{ContextConversionTarget, ConversionTarget, InfallibleConversionTarget};
88pub use time::Time;
89
90#[cfg(test)]
91mod size_tests {
92 use super::*;
93 #[test]
94 fn time_uses_compensated_pair_storage() {
95 assert_eq!(core::mem::size_of::<Time<TT>>(), 16);
96 assert_eq!(core::mem::size_of::<Time<TAI>>(), 16);
97 assert_eq!(core::mem::size_of::<Time<TDB>>(), 16);
98 assert_eq!(core::mem::size_of::<Time<TCG>>(), 16);
99 assert_eq!(core::mem::size_of::<Time<TCB>>(), 16);
100 assert_eq!(core::mem::size_of::<Time<UT1>>(), 16);
101 assert_eq!(core::mem::size_of::<Time<UTC>>(), 16);
102 }
103}