Struct nyx_space::time::prelude::Epoch

source ·
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

source

pub fn get_num_leap_seconds(&self) -> i32

Get the accumulated number of leap seconds up to this Epoch.

source

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.

source

pub fn from_tai_parts(centuries: i16, nanoseconds: u64) -> Epoch

Creates a new Epoch from its centuries and nanosecond since the TAI reference epoch.

source

pub fn from_tai_seconds(seconds: f64) -> Epoch

Initialize an Epoch from the provided TAI seconds since 1900 January 01 at midnight

source

pub fn from_tai_days(days: f64) -> Epoch

Initialize an Epoch from the provided TAI days since 1900 January 01 at midnight

source

pub fn from_utc_seconds(seconds: f64) -> Epoch

Initialize an Epoch from the provided UTC seconds since 1900 January 01 at midnight

source

pub fn from_utc_days(days: f64) -> Epoch

Initialize an Epoch from the provided UTC days since 1900 January 01 at midnight

source

pub fn from_mjd_tai(days: f64) -> Epoch

source

pub fn from_mjd_utc(days: f64) -> Epoch

source

pub fn from_jde_tai(days: f64) -> Epoch

source

pub fn from_jde_utc(days: f64) -> Epoch

source

pub fn from_tt_seconds(seconds: f64) -> Epoch

Initialize an Epoch from the provided TT seconds (approximated to 32.184s delta from TAI)

source

pub fn from_et_seconds(seconds: f64) -> Epoch

Initialized from the Ephemeris Time seconds

source

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

source

pub fn from_jde_et(days: f64) -> Epoch

Initialize from the JDE dayes

source

pub fn from_jde_tdb(days: f64) -> Epoch

Initialize from Dynamic Barycentric Time (TDB) (same as SPICE ephemeris time) in JD days

source

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).

source

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).

source

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.

source

pub fn from_unix_seconds(seconds: f64) -> Epoch

Initialize an Epoch from the provided UNIX second timestamp since UTC midnight 1970 January 01.

source

pub fn from_unix_milliseconds(millisecond: f64) -> Epoch

Initialize an Epoch from the provided UNIX milisecond timestamp since UTC midnight 1970 January 01.

source

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.

source

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.

source

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.

source

pub fn from_gregorian_tai_at_midnight(year: i32, month: u8, day: u8) -> Epoch

Initialize from the Gregoerian date at midnight in TAI.

source

pub fn from_gregorian_tai_at_noon(year: i32, month: u8, day: u8) -> Epoch

Initialize from the Gregorian date at noon in TAI

source

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

source

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.

source

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.

source

pub fn from_gregorian_utc_at_midnight(year: i32, month: u8, day: u8) -> Epoch

Initialize from Gregorian date in UTC at midnight

source

pub fn from_gregorian_utc_at_noon(year: i32, month: u8, day: u8) -> Epoch

Initialize from Gregorian date in UTC at noon

source

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

source

pub fn as_tai_seconds(&self) -> f64

Returns the number of TAI seconds since J1900

source

pub const fn as_tai_duration(&self) -> Duration

Returns this time in a Duration past J1900 counted in TAI

source

pub fn as_tai(&self, unit: Unit) -> f64

Returns the epoch as a floating point value in the provided unit

source

pub const fn to_tai_parts(&self) -> (i16, u64)

Returns the TAI parts of this duration

source

pub fn as_tai_days(&self) -> f64

Returns the number of days since J1900 in TAI

source

pub fn as_utc_seconds(&self) -> f64

Returns the number of UTC seconds since the TAI epoch

source

pub fn as_utc_duration(&self) -> Duration

Returns this time in a Duration past J1900 counted in UTC

source

pub fn as_utc(&self, unit: Unit) -> f64

Returns the number of UTC seconds since the TAI epoch

source

pub fn as_utc_days(&self) -> f64

Returns the number of UTC days since the TAI epoch

source

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.

source

pub fn as_mjd_tai_seconds(&self) -> f64

Returns the Modified Julian Date in seconds TAI.

source

pub fn as_mjd_tai(&self, unit: Unit) -> f64

Returns this epoch as a duration in the requested units in MJD TAI

source

pub fn as_mjd_utc_days(&self) -> f64

Returns the Modified Julian Date in days UTC.

source

pub fn as_mjd_utc(&self, unit: Unit) -> f64

Returns the Modified Julian Date in the provided unit in UTC.

source

pub fn as_mjd_utc_seconds(&self) -> f64

Returns the Modified Julian Date in seconds UTC.

source

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.

source

pub fn as_jde_tai(&self, unit: Unit) -> f64

source

pub fn as_jde_tai_duration(&self) -> Duration

source

pub fn as_jde_tai_seconds(&self) -> f64

Returns the Julian seconds in TAI.

source

pub fn as_jde_utc_days(&self) -> f64

Returns the Julian days in UTC.

source

pub fn as_jde_utc_duration(&self) -> Duration

source

pub fn as_jde_utc_seconds(&self) -> f64

Returns the Julian seconds in UTC.

source

pub fn as_tt_seconds(&self) -> f64

Returns seconds past TAI epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))

source

pub fn as_tt_duration(&self) -> Duration

source

pub fn as_tt_days(&self) -> f64

Returns days past TAI epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))

source

pub fn as_tt_centuries_j2k(&self) -> f64

Returns the centuries pased J2000 TT

source

pub fn as_tt_since_j2k(&self) -> Duration

Returns the duration past J2000 TT

source

pub fn as_jde_tt_days(&self) -> f64

Returns days past Julian epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))

source

pub fn as_jde_tt_duration(&self) -> Duration

source

pub fn as_mjd_tt_days(&self) -> f64

Returns days past Modified Julian epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))

source

pub fn as_mjd_tt_duration(&self) -> Duration

source

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).

source

pub fn as_gpst_duration(&self) -> Duration

source

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.

source

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).

source

pub fn as_unix(&self, unit: Unit) -> f64

Returns the duration since the UNIX epoch in the provided unit.

source

pub fn as_unix_seconds(&self) -> f64

Returns the number seconds since the UNIX epoch defined 01 Jan 1970 midnight UTC.

source

pub fn as_unix_milliseconds(&self) -> f64

Returns the number milliseconds since the UNIX epoch defined 01 Jan 1970 midnight UTC.

source

pub fn as_unix_days(&self) -> f64

Returns the number days since the UNIX epoch defined 01 Jan 1970 midnight UTC.

source

pub fn as_et_seconds(&self) -> f64

Returns the Ephemeris Time seconds past epoch

source

pub fn as_et_duration(&self) -> Duration

source

pub fn as_tdb_duration(&self) -> Duration

Returns the Dynamics Barycentric Time (TDB) as a high precision Duration

source

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)

source

pub fn as_jde_et_days(&self) -> f64

Returns the Ephemeris Time JDE past epoch

source

pub fn as_jde_et_duration(&self) -> Duration

source

pub fn as_jde_et(&self, unit: Unit) -> f64

source

pub fn as_jde_tdb_duration(&self) -> Duration

source

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)

source

pub fn as_tdb_duration_since_j2000(&self) -> Duration

Returns the duration since Dynamic Barycentric Time (TDB) J2000 (used for Archinal et al. rotations)

source

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)

source

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)

source

pub fn as_et_duration_since_j2000(&self) -> Duration

Returns the duration since Ephemeris Time (ET) J2000 (used for Archinal et al. rotations)

source

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)

source

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)

source

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());
source

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);
source

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

pub fn ceil(&self, duration: Duration) -> Epoch

Ceils 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.ceil(1.hours()),
    Epoch::from_gregorian_tai_hms(2022, 5, 20, 18, 0, 0)
);
source

pub fn round(&self, duration: Duration) -> Epoch

Rounds 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.round(1.hours()),
    Epoch::from_gregorian_tai_hms(2022, 5, 20, 18, 0, 0)
);
source§

impl Epoch

source

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()
);
source

pub fn as_gregorian_utc_str(&self) -> String

Converts the Epoch to UTC Gregorian in the ISO8601 format.

source

pub fn as_gregorian_tai_str(&self) -> String

Converts the Epoch to TAI Gregorian in the ISO8601 format with “ TAI“ appended to the string

source

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

source

pub fn now() -> Result<Epoch, Errors>

Initializes a new Epoch from now. WARNING: This assumes that the system time returns the time in UTC (which is the case on Linux) Uses std::time::SystemTime::now under the hood

Trait Implementations§

source§

impl Add<Duration> for Epoch

§

type Output = Epoch

The resulting type after applying the + operator.
source§

fn add(self, duration: Duration) -> Epoch

Performs the + operation. Read more
source§

impl Add<Unit> for Epoch

§

type Output = Epoch

The resulting type after applying the + operator.
source§

fn add(self, unit: Unit) -> Epoch

Performs the + operation. Read more
source§

impl Add<f64> for Epoch

source§

fn add(self, seconds: f64) -> Epoch

WARNING: For speed, there is a possibility to add seconds directly to an Epoch. Using this is discouraged and should only be used if you have facing bottlenecks with the units.

§

type Output = Epoch

The resulting type after applying the + operator.
source§

impl AddAssign<Duration> for Epoch

source§

fn add_assign(&mut self, duration: Duration)

Performs the += operation. Read more
source§

impl AddAssign<Unit> for Epoch

source§

fn add_assign(&mut self, unit: Unit)

Performs the += operation. Read more
source§

impl Clone for Epoch

source§

fn clone(&self) -> Epoch

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Epoch

source§

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

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

impl<'de> Deserialize<'de> for Epoch

source§

fn deserialize<D>( deserializer: D ) -> Result<Epoch, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Epoch

source§

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

The default format of an epoch is in UTC

source§

impl FromStr for Epoch

source§

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());
§

type Err = Errors

The associated error which can be returned from parsing.
source§

impl LowerExp for Epoch

source§

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

Prints the Epoch in TDB

source§

impl LowerHex for Epoch

source§

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

Prints the Epoch in TAI

source§

impl Octal for Epoch

source§

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

Prints the Epoch in GPS

source§

impl Ord for Epoch

source§

fn cmp(&self, other: &Epoch) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Epoch> for Epoch

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Epoch> for Epoch

source§

fn partial_cmp(&self, other: &Epoch) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Pointer for Epoch

source§

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

Prints the Epoch in UNIX

source§

impl Sub<Duration> for Epoch

§

type Output = Epoch

The resulting type after applying the - operator.
source§

fn sub(self, duration: Duration) -> Epoch

Performs the - operation. Read more
source§

impl Sub<Epoch> for Epoch

§

type Output = Duration

The resulting type after applying the - operator.
source§

fn sub(self, other: Epoch) -> Duration

Performs the - operation. Read more
source§

impl Sub<Unit> for Epoch

§

type Output = Epoch

The resulting type after applying the - operator.
source§

fn sub(self, unit: Unit) -> Epoch

Performs the - operation. Read more
source§

impl SubAssign<Duration> for Epoch

source§

fn sub_assign(&mut self, duration: Duration)

Performs the -= operation. Read more
source§

impl SubAssign<Unit> for Epoch

source§

fn sub_assign(&mut self, unit: Unit)

Performs the -= operation. Read more
source§

impl UpperExp for Epoch

source§

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

Prints the Epoch in ET

source§

impl UpperHex for Epoch

source§

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

Prints the Epoch in TT

source§

impl Copy for Epoch

source§

impl Eq for Epoch

source§

impl StructuralEq for Epoch

source§

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<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Printing<T> for Twhere T: Display,

§

fn to_str(self) -> String

Method to serialize. Decorates Vecs with square brackets and tuples with round ones. Implementation code is in printing.rs.
§

fn to_plainstr(self) -> String

Method to serialize in minimal form (space separated, no brackets) Implementation code is in printing.rs.
§

fn rd(self) -> String

Printable in red
§

fn gr(self) -> String

Printable in green
§

fn bl(self) -> String

Printable in blue
§

fn yl(self) -> String

Printable in yellow
§

fn mg(self) -> String

Printable in magenta
§

fn cy(self) -> String

Printable in cyan
§

fn wvec(self, f: &mut File) -> Result<(), Error>

Method to write vector(s) to file f (space separated, without brackets). Passes up io errors
§

fn pvec(self)

Method to print vector(s) to stdout (space separated,without brackets).
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T, Right> ClosedAdd<Right> for Twhere T: Add<Right, Output = T> + AddAssign<Right>,

§

impl<T, Right> ClosedSub<Right> for Twhere T: Sub<Right, Output = T> + SubAssign<Right>,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for Twhere T: 'static + Clone + PartialEq<T> + Debug,