pub enum Error {
Infeasible(String),
Unbounded(String),
InvalidInput(String),
DimensionMismatch {
expected: usize,
got: usize,
},
Timeout {
seconds: f64,
},
Overflow(String),
NoConvergence {
iterations: usize,
},
FfiRequired(String),
Internal(String),
}Expand description
Errors that can occur during optimization
Variants§
Infeasible(String)
Problem has no feasible solution
Unbounded(String)
Problem is unbounded (no finite optimal)
InvalidInput(String)
Invalid input data
DimensionMismatch
Dimension mismatch in input
Timeout
Solver timeout
Overflow(String)
Numeric overflow during computation
NoConvergence
Algorithm did not converge
FfiRequired(String)
Feature requires FFI but it’s not enabled
Internal(String)
Internal error (bug)
Implementations§
Source§impl Error
impl Error
Sourcepub fn infeasible(msg: impl Into<String>) -> Self
pub fn infeasible(msg: impl Into<String>) -> Self
Create an infeasible error
Sourcepub fn invalid_input(msg: impl Into<String>) -> Self
pub fn invalid_input(msg: impl Into<String>) -> Self
Create an invalid input error
Sourcepub fn dimension_mismatch(expected: usize, got: usize) -> Self
pub fn dimension_mismatch(expected: usize, got: usize) -> Self
Create a dimension mismatch error
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