pub struct ConstraintMatch {
pub constraint_name: String,
pub constraint_package: Option<String>,
pub score: ScoreDto,
pub justification: Option<Value>,
pub indicted_objects: Vec<ObjectHandle>,
}Fields§
§constraint_name: String§constraint_package: Option<String>§score: ScoreDto§justification: Option<Value>§indicted_objects: Vec<ObjectHandle>Implementations§
Source§impl ConstraintMatch
impl ConstraintMatch
pub fn new(constraint_name: impl Into<String>, score: ScoreDto) -> Self
pub fn with_package(self, package: impl Into<String>) -> Self
pub fn with_justification(self, justification: Value) -> Self
pub fn with_indicted_object(self, object: ObjectHandle) -> Self
pub fn with_indicted_objects(self, objects: Vec<ObjectHandle>) -> Self
pub fn full_constraint_name(&self) -> String
pub fn is_feasible(&self) -> bool
pub fn hard_score(&self) -> i64
pub fn soft_score(&self) -> i64
Trait Implementations§
Source§impl Clone for ConstraintMatch
impl Clone for ConstraintMatch
Source§fn clone(&self) -> ConstraintMatch
fn clone(&self) -> ConstraintMatch
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConstraintMatch
impl Debug for ConstraintMatch
Source§impl<'de> Deserialize<'de> for ConstraintMatch
impl<'de> Deserialize<'de> for ConstraintMatch
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
Source§impl PartialEq for ConstraintMatch
impl PartialEq for ConstraintMatch
Source§impl Serialize for ConstraintMatch
impl Serialize for ConstraintMatch
impl StructuralPartialEq for ConstraintMatch
Auto Trait Implementations§
impl Freeze for ConstraintMatch
impl RefUnwindSafe for ConstraintMatch
impl Send for ConstraintMatch
impl Sync for ConstraintMatch
impl Unpin for ConstraintMatch
impl UnwindSafe for ConstraintMatch
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)