pub struct TaiSeconds(pub i64);Expand description
Continuous seconds count in the TAI scale (no leap seconds).
TAI is ahead of UTC by a varying number of whole seconds (37 as of 2017-01-01).
The inner i64 counts seconds since the Unix epoch in TAI.
Use LeapSeconds::tai_to_utc to convert
back to UTC, or tai_to_gpst to convert to GPST.
§Example
use leap_sec::TaiSeconds;
let tai = TaiSeconds(1_700_000_037);
assert_eq!(format!("{tai}"), "1700000037 TAI");Tuple Fields§
§0: i64Trait Implementations§
Source§impl Clone for TaiSeconds
impl Clone for TaiSeconds
Source§fn clone(&self) -> TaiSeconds
fn clone(&self) -> TaiSeconds
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaiSeconds
impl Debug for TaiSeconds
Source§impl Display for TaiSeconds
Displays as "{seconds} TAI" (e.g., "1700000037 TAI").
impl Display for TaiSeconds
Displays as "{seconds} TAI" (e.g., "1700000037 TAI").
Source§impl From<TaiSeconds> for TaiNanos
Lossless promotion: multiplies by 1,000,000,000.
impl From<TaiSeconds> for TaiNanos
Lossless promotion: multiplies by 1,000,000,000.
Source§fn from(s: TaiSeconds) -> Self
fn from(s: TaiSeconds) -> Self
Converts to this type from the input type.
Source§impl Hash for TaiSeconds
impl Hash for TaiSeconds
Source§impl Ord for TaiSeconds
impl Ord for TaiSeconds
Source§fn cmp(&self, other: &TaiSeconds) -> Ordering
fn cmp(&self, other: &TaiSeconds) -> Ordering
1.21.0 · 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 TaiSeconds
impl PartialEq for TaiSeconds
Source§impl PartialOrd for TaiSeconds
impl PartialOrd for TaiSeconds
impl Copy for TaiSeconds
impl Eq for TaiSeconds
impl StructuralPartialEq for TaiSeconds
Auto Trait Implementations§
impl Freeze for TaiSeconds
impl RefUnwindSafe for TaiSeconds
impl Send for TaiSeconds
impl Sync for TaiSeconds
impl Unpin for TaiSeconds
impl UnsafeUnpin for TaiSeconds
impl UnwindSafe for TaiSeconds
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