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