pub enum SelectionError {
EmptyProductSet,
InvalidRange {
start_epoch_j2000_s: f64,
end_epoch_j2000_s: f64,
},
NoPriorProduct {
requested_epoch_j2000_s: f64,
},
BeyondStalenessCap {
requested_epoch_j2000_s: f64,
source_epoch_j2000_s: f64,
staleness_s: f64,
max_staleness_s: f64,
},
InvalidProduct(String),
InvalidPolicy {
max_staleness_s: f64,
},
Overflow {
context: &'static str,
},
}Expand description
Error returned when no product can satisfy a request.
No degraded data is ever returned through this type: a successful selection
always carries StalenessMetadata, and these variants are the only outcomes
where the layer declines to produce a result.
Variants§
EmptyProductSet
The product set was empty.
InvalidRange
The requested range was malformed (non-finite, or end before start).
Fields
NoPriorProduct
No product covers or precedes the requested epoch; only later products are available, so there is nothing to degrade to.
BeyondStalenessCap
The most-recent usable product is older than the staleness cap.
Fields
InvalidProduct(String)
A product in the set was malformed (e.g. no epochs, or an epoch that cannot be projected onto the J2000 axis), or the only prior product cannot cover the requested range even after a whole-day diurnal shift.
InvalidPolicy
The staleness policy cap was non-finite or negative. A cap that is not a
finite, non-negative number of seconds cannot bound degradation:
comparisons such as staleness_s > NaN are always false, which would
admit arbitrarily stale data without surfacing it. The selection layer
rejects such a policy rather than masking the failure it exists to catch.
Overflow
An epoch computation overflowed the i64 J2000-second axis for an extreme requested range. No usable result can be produced without wrapping, so the request is declined rather than returning a wrapped epoch.
Trait Implementations§
Source§impl Clone for SelectionError
impl Clone for SelectionError
Source§fn clone(&self) -> SelectionError
fn clone(&self) -> SelectionError
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 SelectionError
impl Debug for SelectionError
Source§impl Display for SelectionError
impl Display for SelectionError
Source§impl Error for SelectionError
impl Error for SelectionError
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 SelectionError
impl PartialEq for SelectionError
Source§fn eq(&self, other: &SelectionError) -> bool
fn eq(&self, other: &SelectionError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SelectionError
Auto Trait Implementations§
impl Freeze for SelectionError
impl RefUnwindSafe for SelectionError
impl Send for SelectionError
impl Sync for SelectionError
impl Unpin for SelectionError
impl UnsafeUnpin for SelectionError
impl UnwindSafe for SelectionError
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<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>
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>
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>
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.