pub struct UtcInstant { /* private fields */ }Expand description
UTC instant represented as unix microseconds.
Implementations§
Source§impl UtcInstant
impl UtcInstant
Sourcepub fn from_unix_microseconds(unix_microseconds: i64) -> Self
pub fn from_unix_microseconds(unix_microseconds: i64) -> Self
Construct from unix microseconds.
Sourcepub fn from_utc(
year: i32,
month: i32,
day: i32,
hour: i32,
minute: i32,
second: i32,
microsecond: i32,
) -> Option<Self>
pub fn from_utc( year: i32, month: i32, day: i32, hour: i32, minute: i32, second: i32, microsecond: i32, ) -> Option<Self>
Construct from UTC calendar fields.
This type stores a POSIX-like Unix microsecond count, so leap-second labels cannot be represented distinctly from the following midnight.
Sourcepub fn unix_microseconds(self) -> i64
pub fn unix_microseconds(self) -> i64
Unix microseconds.
Sourcepub fn time_scales(self) -> TimeScales
pub fn time_scales(self) -> TimeScales
Resolve the precise split-Julian-date time scales (UT1/TT/TDB) for this
UTC instant, via the parity-critical TimeScales::from_utc path.
Exposed so a Rust or Python consumer can reach the precise time scales for an instant given only its unix-microsecond UTC stamp, without restating the calendar breakdown. The numerics are unchanged from the internal pass-finder use.
Trait Implementations§
Source§impl Clone for UtcInstant
impl Clone for UtcInstant
Source§fn clone(&self) -> UtcInstant
fn clone(&self) -> UtcInstant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UtcInstant
Source§impl Debug for UtcInstant
impl Debug for UtcInstant
impl Eq for UtcInstant
Source§impl Ord for UtcInstant
impl Ord for UtcInstant
Source§fn cmp(&self, other: &UtcInstant) -> Ordering
fn cmp(&self, other: &UtcInstant) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UtcInstant
impl PartialEq for UtcInstant
Source§fn eq(&self, other: &UtcInstant) -> bool
fn eq(&self, other: &UtcInstant) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for UtcInstant
impl PartialOrd for UtcInstant
impl StructuralPartialEq for UtcInstant
Auto Trait Implementations§
impl Freeze for UtcInstant
impl RefUnwindSafe for UtcInstant
impl Send for UtcInstant
impl Sync for UtcInstant
impl Unpin for UtcInstant
impl UnsafeUnpin for UtcInstant
impl UnwindSafe for UtcInstant
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.