pub enum Constraint {
NoOverlap {
intervals: Vec<String>,
},
Cumulative {
set: String,
capacity: Expr,
},
Span {
parent: String,
set: String,
},
Alternative {
parent: String,
set: String,
},
Comparison {
left: Expr,
op: CmpOp,
right: Expr,
},
}Expand description
A constraint in the CP model.
Variants§
NoOverlap
no_overlap(set_or_interval, ...)
Cumulative
cumulative(set, capacity)
Span
span(parent, set) — parent covers earliest start to latest end of present children.
Alternative
alternative(parent, set) — exactly one interval from set is present.
Fields
Comparison
<expr> <op> <expr>
Trait Implementations§
Source§impl Clone for Constraint
impl Clone for Constraint
Source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Constraint
impl Debug for Constraint
Source§impl PartialEq for Constraint
impl PartialEq for Constraint
Source§fn eq(&self, other: &Constraint) -> bool
fn eq(&self, other: &Constraint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Constraint
impl Serialize for Constraint
impl StructuralPartialEq for Constraint
Auto Trait Implementations§
impl Freeze for Constraint
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnsafeUnpin for Constraint
impl UnwindSafe for Constraint
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