pub enum PortfolioError {
Problem(ProblemError),
Matrix(MatrixError),
Solver(SolverError),
InvalidParameter(&'static str),
Template(String),
BudgetOutsideBounds {
budget: f64,
minimum: f64,
maximum: f64,
},
}Expand description
Errors from high-level portfolio construction and solution.
Variants§
Problem(ProblemError)
Invalid covariance, objective, constraint, or box data.
Matrix(MatrixError)
A matrix could not be constructed.
Solver(SolverError)
Numerical solver setup failed.
InvalidParameter(&'static str)
A high-level scalar parameter is invalid.
Template(String)
A constraint template’s group, style, or bound data is inconsistent.
BudgetOutsideBounds
The budget cannot be met under the supplied box constraints.
Trait Implementations§
Source§impl Debug for PortfolioError
impl Debug for PortfolioError
Source§impl Display for PortfolioError
impl Display for PortfolioError
Source§impl Error for PortfolioError
impl Error for PortfolioError
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<MatrixError> for PortfolioError
impl From<MatrixError> for PortfolioError
Source§fn from(source: MatrixError) -> Self
fn from(source: MatrixError) -> Self
Converts to this type from the input type.
Source§impl From<ProblemError> for PortfolioError
impl From<ProblemError> for PortfolioError
Source§fn from(source: ProblemError) -> Self
fn from(source: ProblemError) -> Self
Converts to this type from the input type.
Source§impl From<SolverError> for PortfolioError
impl From<SolverError> for PortfolioError
Source§fn from(source: SolverError) -> Self
fn from(source: SolverError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PortfolioError
impl RefUnwindSafe for PortfolioError
impl Send for PortfolioError
impl Sync for PortfolioError
impl Unpin for PortfolioError
impl UnsafeUnpin for PortfolioError
impl UnwindSafe for PortfolioError
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