#[non_exhaustive]pub enum SuccessCriterion {
AtLeastOneViableStrategy,
ValidScheduleFound,
AllTasksAllocated,
MinimumStrategies(usize),
AllEvaluationsPositive,
Custom(String),
}Expand description
Defines when the job is considered successful.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AtLeastOneViableStrategy
At least one viable strategy must exist.
ValidScheduleFound
A valid schedule must be found.
AllTasksAllocated
All tasks must be allocated.
MinimumStrategies(usize)
Minimum number of strategies.
AllEvaluationsPositive
All evaluations must be positive.
Custom(String)
Custom criterion with description.
Implementations§
Source§impl SuccessCriterion
impl SuccessCriterion
Sourcepub fn is_satisfied(&self, ctx: &Context) -> bool
pub fn is_satisfied(&self, ctx: &Context) -> bool
Checks if this criterion is satisfied by the context.
Trait Implementations§
Source§impl Clone for SuccessCriterion
impl Clone for SuccessCriterion
Source§fn clone(&self) -> SuccessCriterion
fn clone(&self) -> SuccessCriterion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SuccessCriterion
impl Debug for SuccessCriterion
Source§impl Hash for SuccessCriterion
impl Hash for SuccessCriterion
Source§impl PartialEq for SuccessCriterion
impl PartialEq for SuccessCriterion
impl Eq for SuccessCriterion
impl StructuralPartialEq for SuccessCriterion
Auto Trait Implementations§
impl Freeze for SuccessCriterion
impl RefUnwindSafe for SuccessCriterion
impl Send for SuccessCriterion
impl Sync for SuccessCriterion
impl Unpin for SuccessCriterion
impl UnwindSafe for SuccessCriterion
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