#[non_exhaustive]pub enum Error {
InvalidParameter {
name: &'static str,
value: String,
reason: String,
},
OutOfDomain {
name: &'static str,
value: f64,
domain: (f64, f64),
},
EmptyInput {
name: &'static str,
},
NonFiniteInput {
name: &'static str,
index: Vec<usize>,
value: f64,
},
NotSupported {
what: String,
},
DecompositionFailed {
reason: String,
},
}Expand description
Error returned by the fallible public functions of this crate
More variants may be added without a major version bump.
Errors compare equal when all their fields do. An error that holds a NaN value is therefore not equal to itself; match on the variant instead.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidParameter
A parameter is outside its valid range.
Fields
OutOfDomain
A point lies outside the domain of a function, e.g. x outside the knots of a polynomial. NaN lies outside every domain.
Fields
EmptyInput
An input that must not be empty is empty.
NonFiniteInput
An input contains NaN or an infinity.
Fields
NotSupported
The operation is not defined for this input, e.g. the even/odd SVE of a kernel that is not centrosymmetric.
DecompositionFailed
A matrix decomposition failed, e.g. the SVD iteration did not converge.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.