pub enum SparseError {
Dimension {
what: &'static str,
expected: usize,
found: usize,
},
IndexOutOfRange {
what: &'static str,
index: usize,
bound: usize,
},
InvalidValue {
what: &'static str,
index: usize,
value: f64,
},
TooLarge {
what: &'static str,
value: usize,
},
Malformed(String),
}Expand description
Structural error of the containers: invariants (C1)–(C4) of Chapter 5.8 or (V1)–(V3) of Chapter 5.8.3 violated by the input, or the basis references of Chapter 5.1 out of range.
The what fields are short static descriptions of the offending array
or quantity (for instance "row index" or "value array").
Variants§
Dimension
Two lengths that must agree do not.
Fields
IndexOutOfRange
An index is not smaller than the dimension it refers to.
Fields
InvalidValue
A stored value is not allowed (non-finite, or an explicit zero where (C3) forbids it).
Fields
TooLarge
A dimension does not fit in the u32 index space.
Malformed(String)
Pointers not nondecreasing, indices not sorted, a pattern inconsistent with its marks…; the message names the invariant.
Trait Implementations§
Source§impl Clone for SparseError
impl Clone for SparseError
Source§impl Debug for SparseError
impl Debug for SparseError
Source§impl Display for SparseError
impl Display for SparseError
Source§impl Error for SparseError
impl Error for SparseError
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<SparseError> for LuError
impl From<SparseError> for LuError
Source§fn from(e: SparseError) -> Self
fn from(e: SparseError) -> Self
Converts to this type from the input type.
Source§impl From<SparseError> for KktError
impl From<SparseError> for KktError
Source§fn from(e: SparseError) -> Self
fn from(e: SparseError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SparseError
impl PartialEq for SparseError
impl StructuralPartialEq for SparseError
Auto Trait Implementations§
impl Forget for SparseError
impl Freeze for SparseError
impl RefUnwindSafe for SparseError
impl Send for SparseError
impl Sync for SparseError
impl Unpin for SparseError
impl UnsafeUnpin for SparseError
impl UnwindSafe for SparseError
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