pub struct Epoch(_);
Expand description
Defines an Epoch in TAI (temps atomique international) in seconds past 1900 January 01 at midnight (like the Network Time Protocol).
Refer to the appropriate functions for initializing this Epoch from different time systems or representations.
Implementations§
source§impl Epoch
impl Epoch
sourcepub fn get_num_leap_seconds(&self) -> i32
pub fn get_num_leap_seconds(&self) -> i32
Get the accumulated number of leap seconds up to this Epoch.
sourcepub const fn from_tai_duration(duration: Duration) -> Epoch
pub const fn from_tai_duration(duration: Duration) -> Epoch
Creates a new Epoch from a Duration as the time difference between this epoch and TAI reference epoch.
sourcepub fn from_tai_parts(centuries: i16, nanoseconds: u64) -> Epoch
pub fn from_tai_parts(centuries: i16, nanoseconds: u64) -> Epoch
Creates a new Epoch from its centuries and nanosecond since the TAI reference epoch.
sourcepub fn from_tai_seconds(seconds: f64) -> Epoch
pub fn from_tai_seconds(seconds: f64) -> Epoch
Initialize an Epoch from the provided TAI seconds since 1900 January 01 at midnight
sourcepub fn from_tai_days(days: f64) -> Epoch
pub fn from_tai_days(days: f64) -> Epoch
Initialize an Epoch from the provided TAI days since 1900 January 01 at midnight
sourcepub fn from_utc_seconds(seconds: f64) -> Epoch
pub fn from_utc_seconds(seconds: f64) -> Epoch
Initialize an Epoch from the provided UTC seconds since 1900 January 01 at midnight
sourcepub fn from_utc_days(days: f64) -> Epoch
pub fn from_utc_days(days: f64) -> Epoch
Initialize an Epoch from the provided UTC days since 1900 January 01 at midnight
pub fn from_mjd_tai(days: f64) -> Epoch
pub fn from_mjd_utc(days: f64) -> Epoch
pub fn from_jde_tai(days: f64) -> Epoch
pub fn from_jde_utc(days: f64) -> Epoch
sourcepub fn from_tt_seconds(seconds: f64) -> Epoch
pub fn from_tt_seconds(seconds: f64) -> Epoch
Initialize an Epoch from the provided TT seconds (approximated to 32.184s delta from TAI)
sourcepub fn from_et_seconds(seconds: f64) -> Epoch
pub fn from_et_seconds(seconds: f64) -> Epoch
Initialized from the Ephemeris Time seconds
sourcepub fn from_tdb_seconds(seconds: f64) -> Epoch
pub fn from_tdb_seconds(seconds: f64) -> Epoch
Initialize from Dynamic Barycentric Time (TDB) (same as SPICE ephemeris time) whose epoch is 2000 JAN 01 noon TAI
sourcepub fn from_jde_et(days: f64) -> Epoch
pub fn from_jde_et(days: f64) -> Epoch
Initialize from the JDE dayes
sourcepub fn from_jde_tdb(days: f64) -> Epoch
pub fn from_jde_tdb(days: f64) -> Epoch
Initialize from Dynamic Barycentric Time (TDB) (same as SPICE ephemeris time) in JD days
sourcepub fn from_gpst_seconds(seconds: f64) -> Epoch
pub fn from_gpst_seconds(seconds: f64) -> Epoch
Initialize an Epoch from the number of seconds since the GPS Time Epoch, defined as UTC midnight of January 5th to 6th 1980 (cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29).
sourcepub fn from_gpst_days(days: f64) -> Epoch
pub fn from_gpst_days(days: f64) -> Epoch
Initialize an Epoch from the number of days since the GPS Time Epoch, defined as UTC midnight of January 5th to 6th 1980 (cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29).
sourcepub fn from_gpst_nanoseconds(nanoseconds: u64) -> Epoch
pub fn from_gpst_nanoseconds(nanoseconds: u64) -> Epoch
Initialize an Epoch from the number of nanoseconds since the GPS Time Epoch, defined as UTC midnight of January 5th to 6th 1980 (cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29). This may be useful for time keeping devices that use GPS as a time source.
sourcepub fn from_unix_seconds(seconds: f64) -> Epoch
pub fn from_unix_seconds(seconds: f64) -> Epoch
Initialize an Epoch from the provided UNIX second timestamp since UTC midnight 1970 January 01.
sourcepub fn from_unix_milliseconds(millisecond: f64) -> Epoch
pub fn from_unix_milliseconds(millisecond: f64) -> Epoch
Initialize an Epoch from the provided UNIX milisecond timestamp since UTC midnight 1970 January 01.
sourcepub fn maybe_from_gregorian_tai(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Result<Epoch, Errors>
pub fn maybe_from_gregorian_tai( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanos: u32 ) -> Result<Epoch, Errors>
Attempts to build an Epoch from the provided Gregorian date and time in TAI.
sourcepub fn maybe_from_gregorian(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32,
ts: TimeSystem
) -> Result<Epoch, Errors>
pub fn maybe_from_gregorian( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanos: u32, ts: TimeSystem ) -> Result<Epoch, Errors>
Attempts to build an Epoch from the provided Gregorian date and time in the provided time system.
sourcepub fn from_gregorian_tai(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Epoch
pub fn from_gregorian_tai( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanos: u32 ) -> Epoch
Builds an Epoch from the provided Gregorian date and time in TAI. If invalid date is provided, this function will panic. Use maybe_from_gregorian_tai if unsure.
sourcepub fn from_gregorian_tai_at_midnight(year: i32, month: u8, day: u8) -> Epoch
pub fn from_gregorian_tai_at_midnight(year: i32, month: u8, day: u8) -> Epoch
Initialize from the Gregoerian date at midnight in TAI.
sourcepub fn from_gregorian_tai_at_noon(year: i32, month: u8, day: u8) -> Epoch
pub fn from_gregorian_tai_at_noon(year: i32, month: u8, day: u8) -> Epoch
Initialize from the Gregorian date at noon in TAI
sourcepub fn from_gregorian_tai_hms(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> Epoch
pub fn from_gregorian_tai_hms( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8 ) -> Epoch
Initialize from the Gregorian date and time (without the nanoseconds) in TAI
sourcepub fn maybe_from_gregorian_utc(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Result<Epoch, Errors>
pub fn maybe_from_gregorian_utc( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanos: u32 ) -> Result<Epoch, Errors>
Attempts to build an Epoch from the provided Gregorian date and time in UTC.
sourcepub fn from_gregorian_utc(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Epoch
pub fn from_gregorian_utc( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanos: u32 ) -> Epoch
Builds an Epoch from the provided Gregorian date and time in TAI. If invalid date is provided, this function will panic. Use maybe_from_gregorian_tai if unsure.
sourcepub fn from_gregorian_utc_at_midnight(year: i32, month: u8, day: u8) -> Epoch
pub fn from_gregorian_utc_at_midnight(year: i32, month: u8, day: u8) -> Epoch
Initialize from Gregorian date in UTC at midnight
sourcepub fn from_gregorian_utc_at_noon(year: i32, month: u8, day: u8) -> Epoch
pub fn from_gregorian_utc_at_noon(year: i32, month: u8, day: u8) -> Epoch
Initialize from Gregorian date in UTC at noon
sourcepub fn from_gregorian_utc_hms(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> Epoch
pub fn from_gregorian_utc_hms( year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8 ) -> Epoch
Initialize from the Gregorian date and time (without the nanoseconds) in UTC
sourcepub fn as_tai_seconds(&self) -> f64
pub fn as_tai_seconds(&self) -> f64
Returns the number of TAI seconds since J1900
sourcepub const fn as_tai_duration(&self) -> Duration
pub const fn as_tai_duration(&self) -> Duration
Returns this time in a Duration past J1900 counted in TAI
sourcepub fn as_tai(&self, unit: Unit) -> f64
pub fn as_tai(&self, unit: Unit) -> f64
Returns the epoch as a floating point value in the provided unit
sourcepub const fn to_tai_parts(&self) -> (i16, u64)
pub const fn to_tai_parts(&self) -> (i16, u64)
Returns the TAI parts of this duration
sourcepub fn as_tai_days(&self) -> f64
pub fn as_tai_days(&self) -> f64
Returns the number of days since J1900 in TAI
sourcepub fn as_utc_seconds(&self) -> f64
pub fn as_utc_seconds(&self) -> f64
Returns the number of UTC seconds since the TAI epoch
sourcepub fn as_utc_duration(&self) -> Duration
pub fn as_utc_duration(&self) -> Duration
Returns this time in a Duration past J1900 counted in UTC
sourcepub fn as_utc_days(&self) -> f64
pub fn as_utc_days(&self) -> f64
Returns the number of UTC days since the TAI epoch
sourcepub fn as_mjd_tai_days(&self) -> f64
pub fn as_mjd_tai_days(&self) -> f64
as_mjd_days
creates an Epoch from the provided Modified Julian Date in days as explained
here. MJD epoch is Modified Julian Day at 17 November 1858 at midnight.
sourcepub fn as_mjd_tai_seconds(&self) -> f64
pub fn as_mjd_tai_seconds(&self) -> f64
Returns the Modified Julian Date in seconds TAI.
sourcepub fn as_mjd_tai(&self, unit: Unit) -> f64
pub fn as_mjd_tai(&self, unit: Unit) -> f64
Returns this epoch as a duration in the requested units in MJD TAI
sourcepub fn as_mjd_utc_days(&self) -> f64
pub fn as_mjd_utc_days(&self) -> f64
Returns the Modified Julian Date in days UTC.
sourcepub fn as_mjd_utc(&self, unit: Unit) -> f64
pub fn as_mjd_utc(&self, unit: Unit) -> f64
Returns the Modified Julian Date in the provided unit in UTC.
sourcepub fn as_mjd_utc_seconds(&self) -> f64
pub fn as_mjd_utc_seconds(&self) -> f64
Returns the Modified Julian Date in seconds UTC.
sourcepub fn as_jde_tai_days(&self) -> f64
pub fn as_jde_tai_days(&self) -> f64
Returns the Julian days from epoch 01 Jan -4713, 12:00 (noon) as explained in “Fundamentals of astrodynamics and applications”, Vallado et al. 4th edition, page 182, and on Wikipedia.
pub fn as_jde_tai(&self, unit: Unit) -> f64
pub fn as_jde_tai_duration(&self) -> Duration
sourcepub fn as_jde_tai_seconds(&self) -> f64
pub fn as_jde_tai_seconds(&self) -> f64
Returns the Julian seconds in TAI.
sourcepub fn as_jde_utc_days(&self) -> f64
pub fn as_jde_utc_days(&self) -> f64
Returns the Julian days in UTC.
pub fn as_jde_utc_duration(&self) -> Duration
sourcepub fn as_jde_utc_seconds(&self) -> f64
pub fn as_jde_utc_seconds(&self) -> f64
Returns the Julian seconds in UTC.
sourcepub fn as_tt_seconds(&self) -> f64
pub fn as_tt_seconds(&self) -> f64
Returns seconds past TAI epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))
pub fn as_tt_duration(&self) -> Duration
sourcepub fn as_tt_days(&self) -> f64
pub fn as_tt_days(&self) -> f64
Returns days past TAI epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))
sourcepub fn as_tt_centuries_j2k(&self) -> f64
pub fn as_tt_centuries_j2k(&self) -> f64
Returns the centuries pased J2000 TT
sourcepub fn as_tt_since_j2k(&self) -> Duration
pub fn as_tt_since_j2k(&self) -> Duration
Returns the duration past J2000 TT
sourcepub fn as_jde_tt_days(&self) -> f64
pub fn as_jde_tt_days(&self) -> f64
Returns days past Julian epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))
pub fn as_jde_tt_duration(&self) -> Duration
sourcepub fn as_mjd_tt_days(&self) -> f64
pub fn as_mjd_tt_days(&self) -> f64
Returns days past Modified Julian epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))
pub fn as_mjd_tt_duration(&self) -> Duration
sourcepub fn as_gpst_seconds(&self) -> f64
pub fn as_gpst_seconds(&self) -> f64
Returns seconds past GPS Time Epoch, defined as UTC midnight of January 5th to 6th 1980 (cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29).
pub fn as_gpst_duration(&self) -> Duration
sourcepub fn as_gpst_nanoseconds(&self) -> Result<u64, Errors>
pub fn as_gpst_nanoseconds(&self) -> Result<u64, Errors>
Returns nanoseconds past GPS Time Epoch, defined as UTC midnight of January 5th to 6th 1980 (cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29). NOTE: This function will return an error if the centuries past GPST time are not zero.
sourcepub fn as_gpst_days(&self) -> f64
pub fn as_gpst_days(&self) -> f64
Returns days past GPS Time Epoch, defined as UTC midnight of January 5th to 6th 1980 (cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29).
sourcepub fn as_unix(&self, unit: Unit) -> f64
pub fn as_unix(&self, unit: Unit) -> f64
Returns the duration since the UNIX epoch in the provided unit.
sourcepub fn as_unix_seconds(&self) -> f64
pub fn as_unix_seconds(&self) -> f64
Returns the number seconds since the UNIX epoch defined 01 Jan 1970 midnight UTC.
sourcepub fn as_unix_milliseconds(&self) -> f64
pub fn as_unix_milliseconds(&self) -> f64
Returns the number milliseconds since the UNIX epoch defined 01 Jan 1970 midnight UTC.
sourcepub fn as_unix_days(&self) -> f64
pub fn as_unix_days(&self) -> f64
Returns the number days since the UNIX epoch defined 01 Jan 1970 midnight UTC.
sourcepub fn as_et_seconds(&self) -> f64
pub fn as_et_seconds(&self) -> f64
Returns the Ephemeris Time seconds past epoch
pub fn as_et_duration(&self) -> Duration
sourcepub fn as_tdb_duration(&self) -> Duration
pub fn as_tdb_duration(&self) -> Duration
Returns the Dynamics Barycentric Time (TDB) as a high precision Duration
sourcepub fn as_tdb_seconds(&self) -> f64
pub fn as_tdb_seconds(&self) -> f64
Returns the Dynamic Barycentric Time (TDB) (higher fidelity SPICE ephemeris time) whose epoch is 2000 JAN 01 noon TAI (cf. https://gssc.esa.int/navipedia/index.php/Transformations_between_Time_Systems#TDT_-_TDB.2C_TCB)
sourcepub fn as_jde_et_days(&self) -> f64
pub fn as_jde_et_days(&self) -> f64
Returns the Ephemeris Time JDE past epoch
pub fn as_jde_et_duration(&self) -> Duration
pub fn as_jde_et(&self, unit: Unit) -> f64
pub fn as_jde_tdb_duration(&self) -> Duration
sourcepub fn as_jde_tdb_days(&self) -> f64
pub fn as_jde_tdb_days(&self) -> f64
Returns the Dynamic Barycentric Time (TDB) (higher fidelity SPICE ephemeris time) whose epoch is 2000 JAN 01 noon TAI (cf. https://gssc.esa.int/navipedia/index.php/Transformations_between_Time_Systems#TDT_-_TDB.2C_TCB)
sourcepub fn as_tdb_duration_since_j2000(&self) -> Duration
pub fn as_tdb_duration_since_j2000(&self) -> Duration
Returns the duration since Dynamic Barycentric Time (TDB) J2000 (used for Archinal et al. rotations)
sourcepub fn as_tdb_days_since_j2000(&self) -> f64
pub fn as_tdb_days_since_j2000(&self) -> f64
Returns the number of days since Dynamic Barycentric Time (TDB) J2000 (used for Archinal et al. rotations)
sourcepub fn as_tdb_centuries_since_j2000(&self) -> f64
pub fn as_tdb_centuries_since_j2000(&self) -> f64
Returns the number of centuries since Dynamic Barycentric Time (TDB) J2000 (used for Archinal et al. rotations)
sourcepub fn as_et_duration_since_j2000(&self) -> Duration
pub fn as_et_duration_since_j2000(&self) -> Duration
Returns the duration since Ephemeris Time (ET) J2000 (used for Archinal et al. rotations)
sourcepub fn as_et_days_since_j2000(&self) -> f64
pub fn as_et_days_since_j2000(&self) -> f64
Returns the number of days since Ephemeris Time (ET) J2000 (used for Archinal et al. rotations)
sourcepub fn as_et_centuries_since_j2000(&self) -> f64
pub fn as_et_centuries_since_j2000(&self) -> f64
Returns the number of centuries since Ephemeris Time (ET) J2000 (used for Archinal et al. rotations)
sourcepub fn as_gregorian_utc(&self) -> (i32, u8, u8, u8, u8, u8, u32)
pub fn as_gregorian_utc(&self) -> (i32, u8, u8, u8, u8, u8, u32)
Converts the Epoch to the Gregorian UTC equivalent as (year, month, day, hour, minute, second). WARNING: Nanoseconds are lost in this conversion!
Example
use hifitime::Epoch;
let dt = Epoch::from_tai_parts(1, 537582752000000000);
// With the std feature, you may use FromStr as such
// let dt_str = "2017-01-14T00:31:55 UTC";
// let dt = Epoch::from_gregorian_str(dt_str).unwrap()
let (y, m, d, h, min, s, _) = dt.as_gregorian_utc();
assert_eq!(y, 2017);
assert_eq!(m, 1);
assert_eq!(d, 14);
assert_eq!(h, 0);
assert_eq!(min, 31);
assert_eq!(s, 55);
#[cfg(feature = "std")]
assert_eq!("2017-01-14T00:31:55 UTC", dt.as_gregorian_utc_str().to_owned());
sourcepub fn as_gregorian_tai(&self) -> (i32, u8, u8, u8, u8, u8, u32)
pub fn as_gregorian_tai(&self) -> (i32, u8, u8, u8, u8, u8, u32)
Converts the Epoch to the Gregorian TAI equivalent as (year, month, day, hour, minute, second). WARNING: Nanoseconds are lost in this conversion!
Example
use hifitime::Epoch;
let dt = Epoch::from_gregorian_tai_at_midnight(1972, 1, 1);
let (y, m, d, h, min, s, _) = dt.as_gregorian_tai();
assert_eq!(y, 1972);
assert_eq!(m, 1);
assert_eq!(d, 1);
assert_eq!(h, 0);
assert_eq!(min, 0);
assert_eq!(s, 0);
sourcepub fn floor(&self, duration: Duration) -> Epoch
pub fn floor(&self, duration: Duration) -> Epoch
Floors this epoch to the closest provided duration
Example
use hifitime::{Epoch, TimeUnits};
let e = Epoch::from_gregorian_tai_hms(2022, 5, 20, 17, 57, 43);
assert_eq!(
e.floor(1.hours()),
Epoch::from_gregorian_tai_hms(2022, 5, 20, 17, 0, 0)
);
source§impl Epoch
impl Epoch
sourcepub fn from_gregorian_str(s: &str) -> Result<Epoch, Errors>
pub fn from_gregorian_str(s: &str) -> Result<Epoch, Errors>
Converts an ISO8601 Datetime representation without timezone offset to an Epoch.
If no time system is specified, than UTC is assumed.
The T
which separates the date from the time can be replaced with a single whitespace character (\W
).
The offset is also optional, cf. the examples below.
Example
use hifitime::Epoch;
let dt = Epoch::from_gregorian_utc(2017, 1, 14, 0, 31, 55, 0);
assert_eq!(
dt,
Epoch::from_gregorian_str("2017-01-14T00:31:55 UTC").unwrap()
);
assert_eq!(
dt,
Epoch::from_gregorian_str("2017-01-14T00:31:55.0000 UTC").unwrap()
);
assert_eq!(
dt,
Epoch::from_gregorian_str("2017-01-14T00:31:55").unwrap()
);
assert_eq!(
dt,
Epoch::from_gregorian_str("2017-01-14 00:31:55").unwrap()
);
// Regression test for #90
assert_eq!(
Epoch::from_gregorian_utc(2017, 1, 14, 0, 31, 55, 811000000),
Epoch::from_gregorian_str("2017-01-14 00:31:55.811 UTC").unwrap()
);
assert_eq!(
Epoch::from_gregorian_utc(2017, 1, 14, 0, 31, 55, 811200000),
Epoch::from_gregorian_str("2017-01-14 00:31:55.8112 UTC").unwrap()
);
sourcepub fn as_gregorian_utc_str(&self) -> String
pub fn as_gregorian_utc_str(&self) -> String
Converts the Epoch to UTC Gregorian in the ISO8601 format.
sourcepub fn as_gregorian_tai_str(&self) -> String
pub fn as_gregorian_tai_str(&self) -> String
Converts the Epoch to TAI Gregorian in the ISO8601 format with “ TAI“ appended to the string
sourcepub fn as_gregorian_str(&self, ts: TimeSystem) -> String
pub fn as_gregorian_str(&self, ts: TimeSystem) -> String
Converts the Epoch to Gregorian in the provided time system and in the ISO8601 format with the time system appended to the string
Trait Implementations§
source§impl AddAssign<Duration> for Epoch
impl AddAssign<Duration> for Epoch
source§fn add_assign(&mut self, duration: Duration)
fn add_assign(&mut self, duration: Duration)
+=
operation. Read moresource§impl AddAssign<Unit> for Epoch
impl AddAssign<Unit> for Epoch
source§fn add_assign(&mut self, unit: Unit)
fn add_assign(&mut self, unit: Unit)
+=
operation. Read moresource§impl<'de> Deserialize<'de> for Epoch
impl<'de> Deserialize<'de> for Epoch
source§fn deserialize<D>(
deserializer: D
) -> Result<Epoch, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<Epoch, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
source§impl FromStr for Epoch
impl FromStr for Epoch
source§fn from_str(s: &str) -> Result<Epoch, <Epoch as FromStr>::Err>
fn from_str(s: &str) -> Result<Epoch, <Epoch as FromStr>::Err>
Attempts to convert a string to an Epoch.
Format identifiers:
- JD: Julian days
- MJD: Modified Julian days
- SEC: Seconds past a given epoch (e.g. SEC 17.2 TAI is 17.2 seconds past TAI Epoch)
Example
use hifitime::Epoch;
use std::str::FromStr;
assert!(Epoch::from_str("JD 2452312.500372511 TDB").is_ok());
assert!(Epoch::from_str("JD 2452312.500372511 ET").is_ok());
assert!(Epoch::from_str("JD 2452312.500372511 TAI").is_ok());
assert!(Epoch::from_str("MJD 51544.5 TAI").is_ok());
assert!(Epoch::from_str("SEC 0.5 TAI").is_ok());
assert!(Epoch::from_str("SEC 66312032.18493909 TDB").is_ok());
source§impl Ord for Epoch
impl Ord for Epoch
source§impl PartialEq<Epoch> for Epoch
impl PartialEq<Epoch> for Epoch
source§impl PartialOrd<Epoch> for Epoch
impl PartialOrd<Epoch> for Epoch
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl SubAssign<Duration> for Epoch
impl SubAssign<Duration> for Epoch
source§fn sub_assign(&mut self, duration: Duration)
fn sub_assign(&mut self, duration: Duration)
-=
operation. Read moresource§impl SubAssign<Unit> for Epoch
impl SubAssign<Unit> for Epoch
source§fn sub_assign(&mut self, unit: Unit)
fn sub_assign(&mut self, unit: Unit)
-=
operation. Read moreimpl Copy for Epoch
impl Eq for Epoch
impl StructuralEq for Epoch
impl StructuralPartialEq for Epoch
Auto Trait Implementations§
impl RefUnwindSafe for Epoch
impl Send for Epoch
impl Sync for Epoch
impl Unpin for Epoch
impl UnwindSafe for Epoch
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Printing<T> for Twhere
T: Display,
impl<T> Printing<T> for Twhere T: Display,
§fn to_str(self) -> String
fn to_str(self) -> String
printing.rs
. §fn to_plainstr(self) -> String
fn to_plainstr(self) -> String
printing.rs
.§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.