pub enum ConversionError {
UtcHistoryUnsupported,
InvalidLeapSecond,
OutOfRange,
Ut1HorizonExceeded,
NonFinite,
UtcBeforeDefinition,
}Expand description
Conversion error surface.
Variants are payload-free in v1 to keep the matrix small; they may carry context in later phases if a concrete call-site demands it.
Variants§
UtcHistoryUnsupported
The active UTC history or policy cannot represent the requested date.
InvalidLeapSecond
A leap-second label does not correspond to a leap second in the compiled UTC history.
OutOfRange
The converted value leaves the representable range of the target.
Ut1HorizonExceeded
A UT1 conversion was requested outside the horizon of the configured ΔT model or observed-data source.
NonFinite
Input or arithmetic produced NaN or ±∞.
UtcBeforeDefinition
The requested date precedes 1961-01-01, before which UTC was not defined as an international standard.
The crate can back-extrapolate the first official UTC-TAI segment to
cover older civil labels, but that extrapolation is not historically
defined UTC and is therefore opt-in. Pass a context built with
crate::TimeContext::allow_pre_definition_utc to enable it.
Trait Implementations§
Source§impl Clone for ConversionError
impl Clone for ConversionError
Source§fn clone(&self) -> ConversionError
fn clone(&self) -> ConversionError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConversionError
impl Debug for ConversionError
Source§impl Display for ConversionError
impl Display for ConversionError
Source§impl Error for ConversionError
impl Error for ConversionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ConversionError
impl PartialEq for ConversionError
Source§fn eq(&self, other: &ConversionError) -> bool
fn eq(&self, other: &ConversionError) -> bool
self and other values to be equal, and is used by ==.impl Copy for ConversionError
impl Eq for ConversionError
impl StructuralPartialEq for ConversionError
Auto Trait Implementations§
impl Freeze for ConversionError
impl RefUnwindSafe for ConversionError
impl Send for ConversionError
impl Sync for ConversionError
impl Unpin for ConversionError
impl UnsafeUnpin for ConversionError
impl UnwindSafe for ConversionError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.