pub enum ValidationError {
DimensionMismatch(String),
NonFiniteValue(String),
IndexOutOfBounds {
index: u32,
row: usize,
cols: usize,
},
NonMonotonicRowPtrs {
position: usize,
},
ParameterOutOfRange {
name: String,
value: String,
expected: String,
},
MatrixTooLarge {
rows: usize,
cols: usize,
max_dim: usize,
},
}Expand description
Validation errors for solver inputs.
These are raised eagerly before any computation begins so that callers get clear diagnostics rather than mysterious numerical failures.
Variants§
DimensionMismatch(String)
Matrix dimensions are inconsistent (e.g. row_ptrs length vs rows).
NonFiniteValue(String)
A value is NaN or infinite where a finite number is required.
IndexOutOfBounds
A column index is out of bounds for the declared number of columns.
Fields
NonMonotonicRowPtrs
The row_ptrs array is not monotonically non-decreasing.
ParameterOutOfRange
A parameter is outside its valid range.
Fields
MatrixTooLarge
Matrix size exceeds the implementation limit.
Trait Implementations§
Source§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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()
Source§impl From<ValidationError> for SolverError
impl From<ValidationError> for SolverError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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