pub struct ConstraintSpec {
pub name: String,
pub constraint_type: ConstraintType,
pub hardness: ConstraintHardness,
pub penalty_weight: f64,
}Expand description
Constraint specification
Fields§
§name: StringConstraint name
constraint_type: ConstraintTypeConstraint type
hardness: ConstraintHardnessWhether this is a hard (must satisfy) or soft constraint
penalty_weight: f64Penalty weight for soft constraints
Implementations§
Source§impl ConstraintSpec
impl ConstraintSpec
Trait Implementations§
Source§impl Clone for ConstraintSpec
impl Clone for ConstraintSpec
Source§fn clone(&self) -> ConstraintSpec
fn clone(&self) -> ConstraintSpec
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 ConstraintSpec
impl Debug for ConstraintSpec
Source§impl<'de> Deserialize<'de> for ConstraintSpec
impl<'de> Deserialize<'de> for ConstraintSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConstraintSpec
impl RefUnwindSafe for ConstraintSpec
impl Send for ConstraintSpec
impl Sync for ConstraintSpec
impl Unpin for ConstraintSpec
impl UnsafeUnpin for ConstraintSpec
impl UnwindSafe for ConstraintSpec
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