pub enum OptimizationError {
    EmptyPopulation,
    InvalidElitism,
    InvalidTournamentSize,
    EvaluationFailed(String),
}Expand description
Error returned by the optimizer when it cannot produce a valid result.
Variants§
EmptyPopulation
Returned when the population size is zero.
InvalidElitism
Returned when elitism is equal to or greater than the population size.
InvalidTournamentSize
Returned when the tournament size is zero.
EvaluationFailed(String)
Returned when evaluating a candidate fails.
Trait Implementations§
Source§impl Debug for OptimizationError
 
impl Debug for OptimizationError
Source§impl Display for OptimizationError
 
impl Display for OptimizationError
Source§impl Error for OptimizationError
 
impl Error for OptimizationError
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()
Auto Trait Implementations§
impl Freeze for OptimizationError
impl RefUnwindSafe for OptimizationError
impl Send for OptimizationError
impl Sync for OptimizationError
impl Unpin for OptimizationError
impl UnwindSafe for OptimizationError
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