pub struct LeapSecondTable { /* private fields */ }Expand description
Authenticated, bounded TAI/UTC leap-second table with validity horizon and clock uncertainty. Per C02-C03, POSIX/UTC-to-TAI mapping requires an identified leap-second table and uncertainty; no floating global epoch or fixed universal UTC offset substitutes for it.
Implementations§
Source§impl LeapSecondTable
impl LeapSecondTable
pub fn new( table_id: SemanticId, steps_slice: &[LeapSecondStep], valid_from_utc_sec: i64, valid_until_utc_sec: i64, table_uncertainty_seconds: f64, ) -> Result<Self, ClockDisciplineError>
pub const fn table_id(&self) -> SemanticId
pub const fn table_digest(&self) -> &[u8; 32]
pub const fn table_uncertainty_seconds(&self) -> f64
Sourcepub fn tai_minus_utc_at(
&self,
utc_second: i64,
) -> Result<i32, ClockDisciplineError>
pub fn tai_minus_utc_at( &self, utc_second: i64, ) -> Result<i32, ClockDisciplineError>
Look up (TAI - UTC) in integer seconds at utc_second within [valid_from_utc_sec, valid_until_utc_sec).
Sourcepub fn convert_utc_instant_to_tai(
&self,
utc_instant: RationalInstant,
tai_origin: SemanticId,
source_time_uncertainty_seconds: Option<f64>,
) -> Result<(RationalInstant, f64), ClockDisciplineError>
pub fn convert_utc_instant_to_tai( &self, utc_instant: RationalInstant, tai_origin: SemanticId, source_time_uncertainty_seconds: Option<f64>, ) -> Result<(RationalInstant, f64), ClockDisciplineError>
Convert a UTC RationalInstant (scale == 1) into a TAI RationalInstant (scale == 0),
returning the converted instant and combined time uncertainty $u_t$ in seconds.
Trait Implementations§
Source§impl Clone for LeapSecondTable
impl Clone for LeapSecondTable
impl Copy for LeapSecondTable
Source§impl Debug for LeapSecondTable
impl Debug for LeapSecondTable
Source§impl PartialEq for LeapSecondTable
impl PartialEq for LeapSecondTable
impl StructuralPartialEq for LeapSecondTable
Auto Trait Implementations§
impl Freeze for LeapSecondTable
impl RefUnwindSafe for LeapSecondTable
impl Send for LeapSecondTable
impl Sync for LeapSecondTable
impl Unpin for LeapSecondTable
impl UnsafeUnpin for LeapSecondTable
impl UnwindSafe for LeapSecondTable
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 more