pub enum Error {
FromAPI(String, i32),
NulError(NulError),
ModelObjectRemoved,
ModelObjectPending,
ModelObjectMismatch,
ModelUpdateNeeded,
AlgebraicError(String),
NotYetSupported(String),
}
Expand description
The error type for operations in Gurobi Rust API
Variants§
FromAPI(String, i32)
An error returned from Gurobi C API. Contains the message and the error code.
NulError(NulError)
Conversion to a C-style null-termined string failed. Contains the underlying std::ffi::NulError
.
ModelObjectRemoved
Query/modifying a removed variable or constraint
ModelObjectPending
Model object hasn’t been updated yet. A call to Model::update
is needed.
ModelObjectMismatch
Model object comes from a different model
ModelUpdateNeeded
A call to Model::update
is required before this operation
AlgebraicError(String)
Modelling errors caused by the user, usually by providing quadratic expressions to methods that expect
linear terms such as Model::add_constr
.
NotYetSupported(String)
Gurobi feature not yet supported by this crate. Currently for internal use only.
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 Eq for Error
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 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