pub trait FeatureConstraint {
    // Required methods
    fn evaluate(
        &self,
        move_ctx: &MoveContext<'_>
    ) -> Option<ConstraintViolation>;
    fn merge(&self, source: Job, candidate: Job) -> Result<Job, ViolationCode>;
}
Expand description

Defines feature constraint behavior.

Required Methods§

source

fn evaluate(&self, move_ctx: &MoveContext<'_>) -> Option<ConstraintViolation>

Evaluates hard constraints violations.

source

fn merge(&self, source: Job, candidate: Job) -> Result<Job, ViolationCode>

Tries to merge two jobs taking into account common constraints. Returns a new job, if it is possible to merge them together having theoretically assignable job. Otherwise returns violation error code.

Implementors§