pub enum ResolutionError {
UnsortedEnergies,
LengthMismatch {
energies: usize,
data: usize,
},
PlanGridMismatch {
first_diff_index: usize,
},
MatrixGridMismatch {
first_diff_index: usize,
},
}Expand description
Errors from resolution broadening operations.
Variants§
UnsortedEnergies
The energy grid is not sorted in ascending order.
LengthMismatch
The energy grid and data arrays have mismatched lengths.
PlanGridMismatch
A ResolutionPlan was passed together with an energies
slice that does not match the grid the plan was built for.
Cheapest-available check hierarchy: length mismatch is caught
first via Self::LengthMismatch (plan.len() == energies.len() is necessary but not sufficient); a content
mismatch fires PlanGridMismatch with the index of the first
differing element so callers can diagnose silent-staleness
bugs at the cache layer.
MatrixGridMismatch
A ResolutionMatrix was passed together with an energies
slice that does not match the grid the matrix was compiled for.
Same semantics as Self::PlanGridMismatch but for the CSR
path (see apply_r).
Trait Implementations§
Source§impl Debug for ResolutionError
impl Debug for ResolutionError
Source§impl Display for ResolutionError
impl Display for ResolutionError
Source§impl Error for ResolutionError
impl Error for ResolutionError
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 From<ResolutionError> for TransmissionError
impl From<ResolutionError> for TransmissionError
Source§fn from(e: ResolutionError) -> Self
fn from(e: ResolutionError) -> Self
Source§impl PartialEq for ResolutionError
impl PartialEq for ResolutionError
impl StructuralPartialEq for ResolutionError
Auto Trait Implementations§
impl Freeze for ResolutionError
impl RefUnwindSafe for ResolutionError
impl Send for ResolutionError
impl Sync for ResolutionError
impl Unpin for ResolutionError
impl UnsafeUnpin for ResolutionError
impl UnwindSafe for ResolutionError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.